From 1e7c0c6685b6b05e0d405deb6cfab01ba7908a05 Mon Sep 17 00:00:00 2001 From: Casey Date: Sun, 5 Jun 2022 17:58:12 -0400 Subject: [PATCH] More TGUI Maintenance --- code/modules/asset_cache/asset_list_items.dm | 5 - code/modules/tgui/tgui.dm | 5 +- tgui/.yarn/sdks/eslint/bin/eslint.js | 2 +- tgui/.yarn/sdks/eslint/lib/api.js | 2 +- tgui/.yarn/sdks/eslint/package.json | 2 +- tgui/.yarn/sdks/integrations.yml | 4 +- tgui/.yarn/sdks/typescript/bin/tsc | 2 +- tgui/.yarn/sdks/typescript/bin/tsserver | 2 +- tgui/.yarn/sdks/typescript/lib/tsc.js | 2 +- tgui/.yarn/sdks/typescript/lib/tsserver.js | 84 +++++++--- .../sdks/typescript/lib/tsserverlibrary.js | 157 ++++++++++++++++++ tgui/.yarn/sdks/typescript/lib/typescript.js | 2 +- tgui/.yarn/sdks/typescript/package.json | 2 +- tgui/babel.config.js | 2 +- tgui/bin/tgui | 2 +- tgui/bin/tgui_.ps1 | 2 +- tgui/package.json | 1 + tgui/packages/tgui-dev-server/dreamseeker.js | 5 +- tgui/packages/tgui-dev-server/index.esm.js | 5 - .../link/{client.js => client.cjs} | 15 +- tgui/packages/tgui-dev-server/link/retrace.js | 8 +- tgui/packages/tgui-dev-server/link/server.js | 8 +- .../{common => tgui-dev-server}/logging.js | 0 tgui/packages/tgui-dev-server/package.json | 3 +- tgui/packages/tgui-dev-server/reloader.js | 4 +- tgui/packages/tgui-dev-server/require.js | 9 + tgui/packages/tgui-dev-server/util.js | 22 +-- tgui/packages/tgui-dev-server/webpack.js | 2 +- tgui/packages/tgui-dev-server/winreg.js | 2 +- tgui/packages/tgui-panel/index.js | 2 +- tgui/packages/tgui/debug/middleware.js | 2 +- tgui/packages/tgui/index.js | 2 +- tgui/packages/tgui/logging.js | 2 +- tgui/public/tgui-common.bundle.js | 1 - tgui/public/tgui-panel.bundle.js | 2 +- tgui/public/tgui.bundle.js | 6 +- tgui/tsconfig.json | 29 ++-- tgui/webpack.config.js | 4 - tgui/yarn.lock | 9 - 39 files changed, 309 insertions(+), 111 deletions(-) create mode 100644 tgui/.yarn/sdks/typescript/lib/tsserverlibrary.js delete mode 100644 tgui/packages/tgui-dev-server/index.esm.js rename tgui/packages/tgui-dev-server/link/{client.js => client.cjs} (94%) rename tgui/packages/{common => tgui-dev-server}/logging.js (100%) create mode 100644 tgui/packages/tgui-dev-server/require.js delete mode 100644 tgui/public/tgui-common.bundle.js diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index 2dab900c67..98b3a55a9b 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -1,9 +1,4 @@ //DEFINITIONS FOR ASSET DATUMS START HERE. -/datum/asset/simple/tgui_common - // keep_local_name = TRUE - assets = list( - "tgui-common.bundle.js" = file("tgui/public/tgui-common.bundle.js"), - ) /datum/asset/simple/tgui // keep_local_name = TRUE diff --git a/code/modules/tgui/tgui.dm b/code/modules/tgui/tgui.dm index 677d20164d..c34ccf63d7 100644 --- a/code/modules/tgui/tgui.dm +++ b/code/modules/tgui/tgui.dm @@ -93,9 +93,8 @@ window.initialize( fancy = user.client.prefs.tgui_fancy, assets = list( - get_asset_datum(/datum/asset/simple/tgui_common), - get_asset_datum(/datum/asset/simple/tgui) - )) + get_asset_datum(/datum/asset/simple/tgui), + )) else window.send_message("ping") window.send_asset(get_asset_datum(/datum/asset/simple/fontawesome)) diff --git a/tgui/.yarn/sdks/eslint/bin/eslint.js b/tgui/.yarn/sdks/eslint/bin/eslint.js index 4e7554dc1a..4d327a49a0 100644 --- a/tgui/.yarn/sdks/eslint/bin/eslint.js +++ b/tgui/.yarn/sdks/eslint/bin/eslint.js @@ -4,7 +4,7 @@ const {existsSync} = require(`fs`); const {createRequire, createRequireFromPath} = require(`module`); const {resolve} = require(`path`); -const relPnpApiPath = "../../../../.pnp.js"; +const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); diff --git a/tgui/.yarn/sdks/eslint/lib/api.js b/tgui/.yarn/sdks/eslint/lib/api.js index ac3c9fc064..97a052442a 100644 --- a/tgui/.yarn/sdks/eslint/lib/api.js +++ b/tgui/.yarn/sdks/eslint/lib/api.js @@ -4,7 +4,7 @@ const {existsSync} = require(`fs`); const {createRequire, createRequireFromPath} = require(`module`); const {resolve} = require(`path`); -const relPnpApiPath = "../../../../.pnp.js"; +const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); diff --git a/tgui/.yarn/sdks/eslint/package.json b/tgui/.yarn/sdks/eslint/package.json index 4b0d99dbb9..744a773210 100644 --- a/tgui/.yarn/sdks/eslint/package.json +++ b/tgui/.yarn/sdks/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "7.21.0-pnpify", + "version": "7.32.0-sdk", "main": "./lib/api.js", "type": "commonjs" } diff --git a/tgui/.yarn/sdks/integrations.yml b/tgui/.yarn/sdks/integrations.yml index 76ed42ba94..aa9d0d0ad8 100644 --- a/tgui/.yarn/sdks/integrations.yml +++ b/tgui/.yarn/sdks/integrations.yml @@ -1,5 +1,5 @@ -# This file is automatically generated by PnPify. -# Manual changes will be lost! +# This file is automatically generated by @yarnpkg/sdks. +# Manual changes might be lost! integrations: - vscode diff --git a/tgui/.yarn/sdks/typescript/bin/tsc b/tgui/.yarn/sdks/typescript/bin/tsc index 06e51d0d97..5608e57430 100644 --- a/tgui/.yarn/sdks/typescript/bin/tsc +++ b/tgui/.yarn/sdks/typescript/bin/tsc @@ -4,7 +4,7 @@ const {existsSync} = require(`fs`); const {createRequire, createRequireFromPath} = require(`module`); const {resolve} = require(`path`); -const relPnpApiPath = "../../../../.pnp.js"; +const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); diff --git a/tgui/.yarn/sdks/typescript/bin/tsserver b/tgui/.yarn/sdks/typescript/bin/tsserver index 2d03f3d97b..cd7d557d52 100644 --- a/tgui/.yarn/sdks/typescript/bin/tsserver +++ b/tgui/.yarn/sdks/typescript/bin/tsserver @@ -4,7 +4,7 @@ const {existsSync} = require(`fs`); const {createRequire, createRequireFromPath} = require(`module`); const {resolve} = require(`path`); -const relPnpApiPath = "../../../../.pnp.js"; +const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); diff --git a/tgui/.yarn/sdks/typescript/lib/tsc.js b/tgui/.yarn/sdks/typescript/lib/tsc.js index e030711c5a..16042d01d4 100644 --- a/tgui/.yarn/sdks/typescript/lib/tsc.js +++ b/tgui/.yarn/sdks/typescript/lib/tsc.js @@ -4,7 +4,7 @@ const {existsSync} = require(`fs`); const {createRequire, createRequireFromPath} = require(`module`); const {resolve} = require(`path`); -const relPnpApiPath = "../../../../.pnp.js"; +const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); diff --git a/tgui/.yarn/sdks/typescript/lib/tsserver.js b/tgui/.yarn/sdks/typescript/lib/tsserver.js index 1d6dfb6115..4d90f3879d 100644 --- a/tgui/.yarn/sdks/typescript/lib/tsserver.js +++ b/tgui/.yarn/sdks/typescript/lib/tsserver.js @@ -4,15 +4,22 @@ const {existsSync} = require(`fs`); const {createRequire, createRequireFromPath} = require(`module`); const {resolve} = require(`path`); -const relPnpApiPath = "../../../../.pnp.js"; +const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); const moduleWrapper = tsserver => { + if (!process.versions.pnp) { + return tsserver; + } + const {isAbsolute} = require(`path`); const pnpApi = require(`pnpapi`); + const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//); + const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`); + const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => { return `${locator.name}@${locator.reference}`; })); @@ -23,9 +30,9 @@ const moduleWrapper = tsserver => { function toEditorPath(str) { // We add the `zip:` prefix to both `.zip/` paths and virtual paths - if (isAbsolute(str) && !str.match(/^\^zip:/) && (str.match(/\.zip\//) || str.match(/\$\$virtual\//))) { + if (isAbsolute(str) && !str.match(/^\^zip:/) && (str.match(/\.zip\//) || isVirtual(str))) { // We also take the opportunity to turn virtual paths into physical ones; - // this makes is much easier to work with workspaces that list peer + // this makes it much easier to work with workspaces that list peer // dependencies, since otherwise Ctrl+Click would bring us to the virtual // file instances instead of the real ones. // @@ -34,26 +41,49 @@ const moduleWrapper = tsserver => { // with peer dep (otherwise jumping into react-dom would show resolution // errors on react). // - const resolved = pnpApi.resolveVirtual(str); + const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str; if (resolved) { const locator = pnpApi.findPackageLocator(resolved); if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) { - str = resolved; + str = resolved; } } - str = str.replace(/\\/g, `/`) - str = str.replace(/^\/?/, `/`); + str = normalize(str); - // Absolute VSCode `Uri.fsPath`s need to start with a slash. - // VSCode only adds it automatically for supported schemes, - // so we have to do it manually for the `zip` scheme. - // The path needs to start with a caret otherwise VSCode doesn't handle the protocol - // - // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910 - // if (str.match(/\.zip\//)) { - str = `${isVSCode ? `^` : ``}zip:${str}`; + switch (hostInfo) { + // Absolute VSCode `Uri.fsPath`s need to start with a slash. + // VSCode only adds it automatically for supported schemes, + // so we have to do it manually for the `zip` scheme. + // The path needs to start with a caret otherwise VSCode doesn't handle the protocol + // + // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910 + // + case `vscode`: { + str = `^zip:${str}`; + } break; + + // To make "go to definition" work, + // We have to resolve the actual file system path from virtual path + // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip) + case `coc-nvim`: { + str = normalize(resolved).replace(/\.zip\//, `.zip::`); + str = resolve(`zipfile:${str}`); + } break; + + // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server) + // We have to resolve the actual file system path from virtual path, + // everything else is up to neovim + case `neovim`: { + str = normalize(resolved).replace(/\.zip\//, `.zip::`); + str = `zipfile:${str}`; + } break; + + default: { + str = `zip:${str}`; + } break; + } } } @@ -66,15 +96,29 @@ const moduleWrapper = tsserver => { : str.replace(/^\^?zip:/, ``); } + // Force enable 'allowLocalPluginLoads' + // TypeScript tries to resolve plugins using a path relative to itself + // which doesn't work when using the global cache + // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238 + // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but + // TypeScript already does local loads and if this code is running the user trusts the workspace + // https://github.com/microsoft/vscode/issues/45856 + const ConfiguredProject = tsserver.server.ConfiguredProject; + const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype; + ConfiguredProject.prototype.enablePluginsWithOptions = function() { + this.projectService.allowLocalPluginLoads = true; + return originalEnablePluginsWithOptions.apply(this, arguments); + }; + // And here is the point where we hijack the VSCode <-> TS communications // by adding ourselves in the middle. We locate everything that looks // like an absolute path of ours and normalize it. const Session = tsserver.server.Session; const {onMessage: originalOnMessage, send: originalSend} = Session.prototype; - let isVSCode = false; + let hostInfo = `unknown`; - return Object.assign(Session.prototype, { + Object.assign(Session.prototype, { onMessage(/** @type {string} */ message) { const parsedMessage = JSON.parse(message) @@ -82,9 +126,9 @@ const moduleWrapper = tsserver => { parsedMessage != null && typeof parsedMessage === `object` && parsedMessage.arguments && - parsedMessage.arguments.hostInfo === `vscode` + typeof parsedMessage.arguments.hostInfo === `string` ) { - isVSCode = true; + hostInfo = parsedMessage.arguments.hostInfo; } return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => { @@ -98,6 +142,8 @@ const moduleWrapper = tsserver => { }))); } }); + + return tsserver; }; if (existsSync(absPnpApiPath)) { diff --git a/tgui/.yarn/sdks/typescript/lib/tsserverlibrary.js b/tgui/.yarn/sdks/typescript/lib/tsserverlibrary.js new file mode 100644 index 0000000000..c3de4ff5d7 --- /dev/null +++ b/tgui/.yarn/sdks/typescript/lib/tsserverlibrary.js @@ -0,0 +1,157 @@ +#!/usr/bin/env node + +const {existsSync} = require(`fs`); +const {createRequire, createRequireFromPath} = require(`module`); +const {resolve} = require(`path`); + +const relPnpApiPath = "../../../../.pnp.cjs"; + +const absPnpApiPath = resolve(__dirname, relPnpApiPath); +const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); + +const moduleWrapper = tsserver => { + if (!process.versions.pnp) { + return tsserver; + } + + const {isAbsolute} = require(`path`); + const pnpApi = require(`pnpapi`); + + const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//); + const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`); + + const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => { + return `${locator.name}@${locator.reference}`; + })); + + // VSCode sends the zip paths to TS using the "zip://" prefix, that TS + // doesn't understand. This layer makes sure to remove the protocol + // before forwarding it to TS, and to add it back on all returned paths. + + function toEditorPath(str) { + // We add the `zip:` prefix to both `.zip/` paths and virtual paths + if (isAbsolute(str) && !str.match(/^\^zip:/) && (str.match(/\.zip\//) || isVirtual(str))) { + // We also take the opportunity to turn virtual paths into physical ones; + // this makes it much easier to work with workspaces that list peer + // dependencies, since otherwise Ctrl+Click would bring us to the virtual + // file instances instead of the real ones. + // + // We only do this to modules owned by the the dependency tree roots. + // This avoids breaking the resolution when jumping inside a vendor + // with peer dep (otherwise jumping into react-dom would show resolution + // errors on react). + // + const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str; + if (resolved) { + const locator = pnpApi.findPackageLocator(resolved); + if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) { + str = resolved; + } + } + + str = normalize(str); + + if (str.match(/\.zip\//)) { + switch (hostInfo) { + // Absolute VSCode `Uri.fsPath`s need to start with a slash. + // VSCode only adds it automatically for supported schemes, + // so we have to do it manually for the `zip` scheme. + // The path needs to start with a caret otherwise VSCode doesn't handle the protocol + // + // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910 + // + case `vscode`: { + str = `^zip:${str}`; + } break; + + // To make "go to definition" work, + // We have to resolve the actual file system path from virtual path + // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip) + case `coc-nvim`: { + str = normalize(resolved).replace(/\.zip\//, `.zip::`); + str = resolve(`zipfile:${str}`); + } break; + + // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server) + // We have to resolve the actual file system path from virtual path, + // everything else is up to neovim + case `neovim`: { + str = normalize(resolved).replace(/\.zip\//, `.zip::`); + str = `zipfile:${str}`; + } break; + + default: { + str = `zip:${str}`; + } break; + } + } + } + + return str; + } + + function fromEditorPath(str) { + return process.platform === `win32` + ? str.replace(/^\^?zip:\//, ``) + : str.replace(/^\^?zip:/, ``); + } + + // Force enable 'allowLocalPluginLoads' + // TypeScript tries to resolve plugins using a path relative to itself + // which doesn't work when using the global cache + // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238 + // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but + // TypeScript already does local loads and if this code is running the user trusts the workspace + // https://github.com/microsoft/vscode/issues/45856 + const ConfiguredProject = tsserver.server.ConfiguredProject; + const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype; + ConfiguredProject.prototype.enablePluginsWithOptions = function() { + this.projectService.allowLocalPluginLoads = true; + return originalEnablePluginsWithOptions.apply(this, arguments); + }; + + // And here is the point where we hijack the VSCode <-> TS communications + // by adding ourselves in the middle. We locate everything that looks + // like an absolute path of ours and normalize it. + + const Session = tsserver.server.Session; + const {onMessage: originalOnMessage, send: originalSend} = Session.prototype; + let hostInfo = `unknown`; + + Object.assign(Session.prototype, { + onMessage(/** @type {string} */ message) { + const parsedMessage = JSON.parse(message) + + if ( + parsedMessage != null && + typeof parsedMessage === `object` && + parsedMessage.arguments && + typeof parsedMessage.arguments.hostInfo === `string` + ) { + hostInfo = parsedMessage.arguments.hostInfo; + } + + return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => { + return typeof value === `string` ? fromEditorPath(value) : value; + })); + }, + + send(/** @type {any} */ msg) { + return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => { + return typeof value === `string` ? toEditorPath(value) : value; + }))); + } + }); + + return tsserver; +}; + +if (existsSync(absPnpApiPath)) { + if (!process.versions.pnp) { + // Setup the environment to be able to require typescript/lib/tsserverlibrary.js + require(absPnpApiPath).setup(); + } +} + +// Defer to the real typescript/lib/tsserverlibrary.js your application uses +module.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`)); diff --git a/tgui/.yarn/sdks/typescript/lib/typescript.js b/tgui/.yarn/sdks/typescript/lib/typescript.js index 7e3c852fe1..cbdbf1500f 100644 --- a/tgui/.yarn/sdks/typescript/lib/typescript.js +++ b/tgui/.yarn/sdks/typescript/lib/typescript.js @@ -4,7 +4,7 @@ const {existsSync} = require(`fs`); const {createRequire, createRequireFromPath} = require(`module`); const {resolve} = require(`path`); -const relPnpApiPath = "../../../../.pnp.js"; +const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); diff --git a/tgui/.yarn/sdks/typescript/package.json b/tgui/.yarn/sdks/typescript/package.json index 254e665561..ea85e133e8 100644 --- a/tgui/.yarn/sdks/typescript/package.json +++ b/tgui/.yarn/sdks/typescript/package.json @@ -1,6 +1,6 @@ { "name": "typescript", - "version": "4.2.3-pnpify", + "version": "4.3.5-sdk", "main": "./lib/typescript.js", "type": "commonjs" } diff --git a/tgui/babel.config.js b/tgui/babel.config.js index 46fc0b0768..e2f3248066 100644 --- a/tgui/babel.config.js +++ b/tgui/babel.config.js @@ -14,7 +14,7 @@ const createBabelConfig = options => { [require.resolve('@babel/preset-env'), { modules: 'commonjs', useBuiltIns: 'entry', - corejs: '3.10', + corejs: '3', spec: false, loose: true, targets: [], diff --git a/tgui/bin/tgui b/tgui/bin/tgui index 40579fbe47..dc1d05578b 100644 --- a/tgui/bin/tgui +++ b/tgui/bin/tgui @@ -59,7 +59,7 @@ task-webpack() { ## Runs a development server task-dev-server() { cd "${base_dir}" - yarn node packages/tgui-dev-server/index.esm.js "${@}" + yarn node --experimental-modules packages/tgui-dev-server/index.js "${@}" } ## Run a linter through all packages diff --git a/tgui/bin/tgui_.ps1 b/tgui/bin/tgui_.ps1 index c8f74b2d21..54585c6252 100644 --- a/tgui/bin/tgui_.ps1 +++ b/tgui/bin/tgui_.ps1 @@ -47,7 +47,7 @@ function task-webpack { ## Runs a development server function task-dev-server { - yarn node "packages/tgui-dev-server/index.esm.js" @Args + yarn node --experimental-modules "packages/tgui-dev-server/index.js" @Args } ## Run a linter through all packages diff --git a/tgui/package.json b/tgui/package.json index a8c4c80f46..cdaea68107 100644 --- a/tgui/package.json +++ b/tgui/package.json @@ -2,6 +2,7 @@ "private": true, "name": "tgui-workspace", "version": "4.4.0", + "packageManager": "yarn@3.2.1", "workspaces": [ "packages/*" ], diff --git a/tgui/packages/tgui-dev-server/dreamseeker.js b/tgui/packages/tgui-dev-server/dreamseeker.js index 60654219b0..3d4149cf25 100644 --- a/tgui/packages/tgui-dev-server/dreamseeker.js +++ b/tgui/packages/tgui-dev-server/dreamseeker.js @@ -4,11 +4,12 @@ * @license MIT */ -import axios from 'axios'; import { exec } from 'child_process'; -import { createLogger } from 'common/logging.js'; import { promisify } from 'util'; +import { createLogger } from './logging.js'; +import { require } from './require.js'; +const axios = require('axios'); const logger = createLogger('dreamseeker'); const instanceByPid = new Map(); diff --git a/tgui/packages/tgui-dev-server/index.esm.js b/tgui/packages/tgui-dev-server/index.esm.js deleted file mode 100644 index 903fc9c17c..0000000000 --- a/tgui/packages/tgui-dev-server/index.esm.js +++ /dev/null @@ -1,5 +0,0 @@ -const esmRequire = require('esm')(module, { - cache: false, -}); - -esmRequire('./index.js'); diff --git a/tgui/packages/tgui-dev-server/link/client.js b/tgui/packages/tgui-dev-server/link/client.cjs similarity index 94% rename from tgui/packages/tgui-dev-server/link/client.js rename to tgui/packages/tgui-dev-server/link/client.cjs index 5a4d2f6112..fe75314acd 100644 --- a/tgui/packages/tgui-dev-server/link/client.js +++ b/tgui/packages/tgui-dev-server/link/client.cjs @@ -37,7 +37,7 @@ if (process.env.NODE_ENV !== 'production') { window.onunload = () => socket && socket.close(); } -export const subscribe = fn => subscribers.push(fn); +const subscribe = fn => subscribers.push(fn); /** * A json serializer which handles circular references and other junk. @@ -91,7 +91,7 @@ const serializeObject = obj => { return json; }; -export const sendMessage = msg => { +const sendMessage = msg => { if (process.env.NODE_ENV !== 'production') { const json = serializeObject(msg); // Send message using WebSocket @@ -119,7 +119,7 @@ export const sendMessage = msg => { } }; -export const sendLogEntry = (level, ns, ...args) => { +const sendLogEntry = (level, ns, ...args) => { if (process.env.NODE_ENV !== 'production') { try { sendMessage({ @@ -135,7 +135,7 @@ export const sendLogEntry = (level, ns, ...args) => { } }; -export const setupHotReloading = () => { +const setupHotReloading = () => { if (process.env.NODE_ENV !== 'production' && process.env.WEBPACK_HMR_ENABLED && window.WebSocket) { @@ -168,3 +168,10 @@ export const setupHotReloading = () => { } } }; + +module.exports = { + subscribe, + sendMessage, + sendLogEntry, + setupHotReloading, +}; diff --git a/tgui/packages/tgui-dev-server/link/retrace.js b/tgui/packages/tgui-dev-server/link/retrace.js index c86b40456c..c10ba9cb17 100644 --- a/tgui/packages/tgui-dev-server/link/retrace.js +++ b/tgui/packages/tgui-dev-server/link/retrace.js @@ -4,13 +4,15 @@ * @license MIT */ -import { createLogger } from 'common/logging.js'; import fs from 'fs'; import { basename } from 'path'; -import SourceMap from 'source-map'; -import { parse as parseStackTrace } from 'stacktrace-parser'; +import { createLogger } from '../logging.js'; +import { require } from '../require.js'; import { resolveGlob } from '../util.js'; +const SourceMap = require('source-map'); +const { parse: parseStackTrace } = require('stacktrace-parser'); + const logger = createLogger('retrace'); const { SourceMapConsumer } = SourceMap; diff --git a/tgui/packages/tgui-dev-server/link/server.js b/tgui/packages/tgui-dev-server/link/server.js index 2586d77779..87a8a5911b 100644 --- a/tgui/packages/tgui-dev-server/link/server.js +++ b/tgui/packages/tgui-dev-server/link/server.js @@ -4,11 +4,13 @@ * @license MIT */ -import { createLogger, directLog } from 'common/logging.js'; import http from 'http'; import { inspect } from 'util'; -import WebSocket from 'ws'; -import { retrace, loadSourceMaps } from './retrace.js'; +import { createLogger, directLog } from '../logging.js'; +import { require } from '../require.js'; +import { loadSourceMaps, retrace } from './retrace.js'; + +const WebSocket = require('ws'); const logger = createLogger('link'); diff --git a/tgui/packages/common/logging.js b/tgui/packages/tgui-dev-server/logging.js similarity index 100% rename from tgui/packages/common/logging.js rename to tgui/packages/tgui-dev-server/logging.js diff --git a/tgui/packages/tgui-dev-server/package.json b/tgui/packages/tgui-dev-server/package.json index 7c41d0caee..4076ef805f 100644 --- a/tgui/packages/tgui-dev-server/package.json +++ b/tgui/packages/tgui-dev-server/package.json @@ -2,10 +2,9 @@ "private": true, "name": "tgui-dev-server", "version": "4.3.0", + "type": "module", "dependencies": { "axios": "^0.27.2", - "common": "workspace:*", - "esm": "^3.2.25", "glob": "^8.0.3", "source-map": "^0.7.3", "stacktrace-parser": "^0.1.10", diff --git a/tgui/packages/tgui-dev-server/reloader.js b/tgui/packages/tgui-dev-server/reloader.js index 9bc40d6484..5722cee644 100644 --- a/tgui/packages/tgui-dev-server/reloader.js +++ b/tgui/packages/tgui-dev-server/reloader.js @@ -4,13 +4,13 @@ * @license MIT */ -import { createLogger } from 'common/logging.js'; import fs from 'fs'; import os from 'os'; import { basename } from 'path'; +import { DreamSeeker } from './dreamseeker.js'; +import { createLogger } from './logging.js'; import { resolveGlob, resolvePath } from './util.js'; import { regQuery } from './winreg.js'; -import { DreamSeeker } from './dreamseeker.js'; const logger = createLogger('reloader'); diff --git a/tgui/packages/tgui-dev-server/require.js b/tgui/packages/tgui-dev-server/require.js new file mode 100644 index 0000000000..0551d630fc --- /dev/null +++ b/tgui/packages/tgui-dev-server/require.js @@ -0,0 +1,9 @@ +/** + * @file + * @copyright 2020 Aleksej Komarov + * @license MIT + */ + +import { createRequire } from 'module'; + +export const require = createRequire(import.meta.url); diff --git a/tgui/packages/tgui-dev-server/util.js b/tgui/packages/tgui-dev-server/util.js index 50c0baad5a..0fc255ed67 100644 --- a/tgui/packages/tgui-dev-server/util.js +++ b/tgui/packages/tgui-dev-server/util.js @@ -4,26 +4,26 @@ * @license MIT */ -import glob from 'glob'; -import { resolve as resolvePath } from 'path'; import fs from 'fs'; -import { promisify } from 'util'; +import path from 'path'; +import { require } from './require.js'; -export { resolvePath }; +const globPkg = require('glob'); + +export const resolvePath = path.resolve; /** * Combines path.resolve with glob patterns. */ -export const resolveGlob = async (...sections) => { - const unsafePaths = await promisify(glob)( - resolvePath(...sections), { - strict: false, - silent: true, - }); +export const resolveGlob = (...sections) => { + const unsafePaths = globPkg.sync(path.resolve(...sections), { + strict: false, + silent: true, + }); const safePaths = []; for (let path of unsafePaths) { try { - await promisify(fs.stat)(path); + fs.statSync(path); safePaths.push(path); } catch {} diff --git a/tgui/packages/tgui-dev-server/webpack.js b/tgui/packages/tgui-dev-server/webpack.js index 4aba3af6d5..8cba68afcb 100644 --- a/tgui/packages/tgui-dev-server/webpack.js +++ b/tgui/packages/tgui-dev-server/webpack.js @@ -4,11 +4,11 @@ * @license MIT */ -import { createLogger } from 'common/logging.js'; import fs from 'fs'; import { createRequire } from 'module'; import { dirname } from 'path'; import { loadSourceMaps, setupLink } from './link/server.js'; +import { createLogger } from './logging.js'; import { reloadByondCache } from './reloader.js'; import { resolveGlob } from './util.js'; diff --git a/tgui/packages/tgui-dev-server/winreg.js b/tgui/packages/tgui-dev-server/winreg.js index 974135e76d..669e2aad55 100644 --- a/tgui/packages/tgui-dev-server/winreg.js +++ b/tgui/packages/tgui-dev-server/winreg.js @@ -7,8 +7,8 @@ */ import { exec } from 'child_process'; -import { createLogger } from 'common/logging.js'; import { promisify } from 'util'; +import { createLogger } from './logging.js'; const logger = createLogger('winreg'); diff --git a/tgui/packages/tgui-panel/index.js b/tgui/packages/tgui-panel/index.js index 0e08014b2b..721fa97fb5 100644 --- a/tgui/packages/tgui-panel/index.js +++ b/tgui/packages/tgui-panel/index.js @@ -10,7 +10,7 @@ import './styles/themes/light.scss'; import { perf } from 'common/perf'; import { combineReducers } from 'common/redux'; -import { setupHotReloading } from 'tgui-dev-server/link/client'; +import { setupHotReloading } from 'tgui-dev-server/link/client.cjs'; import { setupGlobalEvents } from 'tgui/events'; import { captureExternalLinks } from 'tgui/links'; import { createRenderer } from 'tgui/renderer'; diff --git a/tgui/packages/tgui/debug/middleware.js b/tgui/packages/tgui/debug/middleware.js index 55219dcf5c..92e64fe3bd 100644 --- a/tgui/packages/tgui/debug/middleware.js +++ b/tgui/packages/tgui/debug/middleware.js @@ -39,7 +39,7 @@ export const debugMiddleware = store => { }; export const relayMiddleware = store => { - const devServer = require('tgui-dev-server/link/client'); + const devServer = require('tgui-dev-server/link/client.cjs'); const externalBrowser = location.search === '?external'; if (externalBrowser) { devServer.subscribe(msg => { diff --git a/tgui/packages/tgui/index.js b/tgui/packages/tgui/index.js index 653b422812..c08f725698 100644 --- a/tgui/packages/tgui/index.js +++ b/tgui/packages/tgui/index.js @@ -20,7 +20,7 @@ import './styles/themes/wizard.scss'; import './styles/themes/abstract.scss'; import { perf } from 'common/perf'; -import { setupHotReloading } from 'tgui-dev-server/link/client'; +import { setupHotReloading } from 'tgui-dev-server/link/client.cjs'; import { setupHotKeys } from './hotkeys'; import { captureExternalLinks } from './links'; import { createRenderer } from './renderer'; diff --git a/tgui/packages/tgui/logging.js b/tgui/packages/tgui/logging.js index 9138964c5c..d44b67ebc5 100644 --- a/tgui/packages/tgui/logging.js +++ b/tgui/packages/tgui/logging.js @@ -4,7 +4,7 @@ * @license MIT */ -import { sendLogEntry } from 'tgui-dev-server/link/client'; +import { sendLogEntry } from 'tgui-dev-server/link/client.cjs'; const LEVEL_DEBUG = 0; const LEVEL_LOG = 1; diff --git a/tgui/public/tgui-common.bundle.js b/tgui/public/tgui-common.bundle.js deleted file mode 100644 index e47d76b362..0000000000 --- a/tgui/public/tgui-common.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunktgui_workspace=self.webpackChunktgui_workspace||[]).push([[962],{21926:function(e,t,n){"use strict";t.__esModule=!0,t.createPopper=void 0,t.popperGenerator=v;var r=d(n(48764)),o=d(n(68349)),i=d(n(3671)),a=d(n(55490)),u=(d(n(40755)),d(n(69282))),c=d(n(27672)),s=(d(n(30752)),d(n(12459)),d(n(27629)),d(n(54220))),l=d(n(75949));t.detectOverflow=l["default"];var f=n(79388);n(15954);function d(e){return e&&e.__esModule?e:{"default":e}}var p={placement:"bottom",modifiers:[],strategy:"absolute"};function h(){for(var e=arguments.length,t=new Array(e),n=0;n0&&(i=(0,o.round)(n.width)/c||1),u>0&&(a=(0,o.round)(n.height)/u||1)}return{width:n.width/i,height:n.height/a,top:n.top/a,right:n.right/i,bottom:n.bottom/a,left:n.left/i,x:n.left/i,y:n.top/a}};var r=n(79388),o=n(36291)},65647:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t,n){var r="clippingParents"===t?function(e){var t=(0,a["default"])((0,d["default"])(e)),n=["absolute","fixed"].indexOf((0,s["default"])(e).position)>=0&&(0,l.isHTMLElement)(e)?(0,u["default"])(e):e;if(!(0,l.isElement)(n))return[];return t.filter((function(e){return(0,l.isElement)(e)&&(0,p["default"])(e,n)&&"body"!==(0,h["default"])(e)}))}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],c=o.reduce((function(t,n){var r=y(e,n);return t.top=(0,m.max)(r.top,t.top),t.right=(0,m.min)(r.right,t.right),t.bottom=(0,m.min)(r.bottom,t.bottom),t.left=(0,m.max)(r.left,t.left),t}),y(e,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c};var r=n(15954),o=g(n(8204)),i=g(n(40015)),a=g(n(3671)),u=g(n(55490)),c=g(n(25890)),s=g(n(40755)),l=n(79388),f=g(n(11100)),d=g(n(95136)),p=g(n(62215)),h=g(n(38569)),v=g(n(73060)),m=n(36291);function g(e){return e&&e.__esModule?e:{"default":e}}function y(e,t){return t===r.viewport?(0,v["default"])((0,o["default"])(e)):(0,l.isElement)(t)?function(e){var t=(0,f["default"])(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):(0,v["default"])((0,i["default"])((0,c["default"])(e)))}},48764:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t,n){void 0===n&&(n=!1);var f=(0,a.isHTMLElement)(t),d=(0,a.isHTMLElement)(t)&&function(e){var t=e.getBoundingClientRect(),n=(0,l.round)(t.width)/e.offsetWidth||1,r=(0,l.round)(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),p=(0,c["default"])(t),h=(0,r["default"])(e,d),v={scrollLeft:0,scrollTop:0},m={x:0,y:0};(f||!f&&!n)&&(("body"!==(0,i["default"])(t)||(0,s["default"])(p))&&(v=(0,o["default"])(t)),(0,a.isHTMLElement)(t)?((m=(0,r["default"])(t,!0)).x+=t.clientLeft,m.y+=t.clientTop):p&&(m.x=(0,u["default"])(p)));return{x:h.left+v.scrollLeft-m.x,y:h.top+v.scrollTop-m.y,width:h.width,height:h.height}};var r=f(n(11100)),o=f(n(3514)),i=f(n(38569)),a=n(79388),u=f(n(36056)),c=f(n(25890)),s=f(n(57360)),l=n(36291);function f(e){return e&&e.__esModule?e:{"default":e}}},40755:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return(0,o["default"])(e).getComputedStyle(e)};var r,o=(r=n(96904))&&r.__esModule?r:{"default":r}},25890:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return(((0,r.isElement)(e)?e.ownerDocument:e.document)||window.document).documentElement};var r=n(79388)},40015:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t,n=(0,r["default"])(e),c=(0,a["default"])(e),s=null==(t=e.ownerDocument)?void 0:t.body,l=(0,u.max)(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),f=(0,u.max)(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),d=-c.scrollLeft+(0,i["default"])(e),p=-c.scrollTop;"rtl"===(0,o["default"])(s||n).direction&&(d+=(0,u.max)(n.clientWidth,s?s.clientWidth:0)-l);return{width:l,height:f,x:d,y:p}};var r=c(n(25890)),o=c(n(40755)),i=c(n(36056)),a=c(n(69211)),u=n(36291);function c(e){return e&&e.__esModule?e:{"default":e}}},41829:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}},68349:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,o["default"])(e),n=e.offsetWidth,r=e.offsetHeight;Math.abs(t.width-n)<=1&&(n=t.width);Math.abs(t.height-r)<=1&&(r=t.height);return{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}};var r,o=(r=n(11100))&&r.__esModule?r:{"default":r}},38569:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return e?(e.nodeName||"").toLowerCase():null}},3514:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return e!==(0,o["default"])(e)&&(0,i.isHTMLElement)(e)?(0,a["default"])(e):(0,r["default"])(e)};var r=u(n(69211)),o=u(n(96904)),i=n(79388),a=u(n(41829));function u(e){return e&&e.__esModule?e:{"default":e}}},55490:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,r["default"])(e),n=l(e);for(;n&&(0,u["default"])(n)&&"static"===(0,i["default"])(n).position;)n=l(n);if(n&&("html"===(0,o["default"])(n)||"body"===(0,o["default"])(n)&&"static"===(0,i["default"])(n).position))return t;return n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&(0,a.isHTMLElement)(e)){if("fixed"===(0,i["default"])(e).position)return null}var n=(0,c["default"])(e);(0,a.isShadowRoot)(n)&&(n=n.host);for(;(0,a.isHTMLElement)(n)&&["html","body"].indexOf((0,o["default"])(n))<0;){var r=(0,i["default"])(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t};var r=s(n(96904)),o=s(n(38569)),i=s(n(40755)),a=n(79388),u=s(n(94437)),c=s(n(95136));function s(e){return e&&e.__esModule?e:{"default":e}}function l(e){return(0,a.isHTMLElement)(e)&&"fixed"!==(0,i["default"])(e).position?e.offsetParent:null}},95136:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){if("html"===(0,r["default"])(e))return e;return e.assignedSlot||e.parentNode||((0,i.isShadowRoot)(e)?e.host:null)||(0,o["default"])(e)};var r=a(n(38569)),o=a(n(25890)),i=n(79388);function a(e){return e&&e.__esModule?e:{"default":e}}},43367:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function c(e){if(["html","body","#document"].indexOf((0,i["default"])(e))>=0)return e.ownerDocument.body;if((0,a.isHTMLElement)(e)&&(0,o["default"])(e))return e;return c((0,r["default"])(e))};var r=u(n(95136)),o=u(n(57360)),i=u(n(38569)),a=n(79388);function u(e){return e&&e.__esModule?e:{"default":e}}},8204:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,r["default"])(e),n=(0,o["default"])(e),a=t.visualViewport,u=n.clientWidth,c=n.clientHeight,s=0,l=0;a&&(u=a.width,c=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=a.offsetLeft,l=a.offsetTop));return{width:u,height:c,x:s+(0,i["default"])(e),y:l}};var r=a(n(96904)),o=a(n(25890)),i=a(n(36056));function a(e){return e&&e.__esModule?e:{"default":e}}},96904:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}},69211:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,o["default"])(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}};var r,o=(r=n(96904))&&r.__esModule?r:{"default":r}},36056:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return(0,r["default"])((0,o["default"])(e)).left+(0,i["default"])(e).scrollLeft};var r=a(n(11100)),o=a(n(25890)),i=a(n(69211));function a(e){return e&&e.__esModule?e:{"default":e}}},79388:function(e,t,n){"use strict";t.__esModule=!0,t.isElement=function(e){var t=(0,o["default"])(e).Element;return e instanceof t||e instanceof Element},t.isHTMLElement=function(e){var t=(0,o["default"])(e).HTMLElement;return e instanceof t||e instanceof HTMLElement},t.isShadowRoot=function(e){if("undefined"==typeof ShadowRoot)return!1;var t=(0,o["default"])(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot};var r,o=(r=n(96904))&&r.__esModule?r:{"default":r}},57360:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,o["default"])(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)};var r,o=(r=n(40755))&&r.__esModule?r:{"default":r}},94437:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return["table","td","th"].indexOf((0,o["default"])(e))>=0};var r,o=(r=n(38569))&&r.__esModule?r:{"default":r}},3671:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function c(e,t){var n;void 0===t&&(t=[]);var u=(0,r["default"])(e),s=u===(null==(n=e.ownerDocument)?void 0:n.body),l=(0,i["default"])(u),f=s?[l].concat(l.visualViewport||[],(0,a["default"])(u)?u:[]):u,d=t.concat(f);return s?d:d.concat(c((0,o["default"])(f)))};var r=u(n(43367)),o=u(n(95136)),i=u(n(96904)),a=u(n(57360));function u(e){return e&&e.__esModule?e:{"default":e}}},15954:function(e,t){"use strict";t.__esModule=!0,t.write=t.viewport=t.variationPlacements=t.top=t.start=t.right=t.reference=t.read=t.popper=t.placements=t.modifierPhases=t.main=t.left=t.end=t.clippingParents=t.bottom=t.beforeWrite=t.beforeRead=t.beforeMain=t.basePlacements=t.auto=t.afterWrite=t.afterRead=t.afterMain=void 0;t.top="top";var n="bottom";t.bottom=n;var r="right";t.right=r;var o="left";t.left=o;var i="auto";t.auto=i;var a=["top",n,r,o];t.basePlacements=a;var u="start";t.start=u;var c="end";t.end=c;t.clippingParents="clippingParents";t.viewport="viewport";t.popper="popper";t.reference="reference";var s=a.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+c])}),[]);t.variationPlacements=s;var l=[].concat(a,[i]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+c])}),[]);t.placements=l;var f="beforeRead";t.beforeRead=f;var d="read";t.read=d;var p="afterRead";t.afterRead=p;var h="beforeMain";t.beforeMain=h;var v="main";t.main=v;var m="afterMain";t.afterMain=m;var g="beforeWrite";t.beforeWrite=g;var y="write";t.write=y;var b="afterWrite";t.afterWrite=b;var x=[f,d,p,h,v,m,g,y,b];t.modifierPhases=x},37809:function(e,t,n){"use strict";t.__esModule=!0;var r={popperGenerator:!0,detectOverflow:!0,createPopperBase:!0,createPopper:!0,createPopperLite:!0};t.popperGenerator=t.detectOverflow=t.createPopperLite=t.createPopperBase=t.createPopper=void 0;var o=n(15954);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||(t[e]=o[e]))}));var i=n(4207);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}));var a=n(21926);t.popperGenerator=a.popperGenerator,t.detectOverflow=a.detectOverflow,t.createPopperBase=a.createPopper;var u=n(17827);t.createPopper=u.createPopper;var c=n(47952);t.createPopperLite=c.createPopper},89290:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r,o=(r=n(38569))&&r.__esModule?r:{"default":r},i=n(79388);var a={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},a=t.elements[e];(0,i.isHTMLElement)(a)&&(0,o["default"])(a)&&(Object.assign(a.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],a=t.attributes[e]||{},u=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});(0,i.isHTMLElement)(r)&&(0,o["default"])(r)&&(Object.assign(r.style,u),Object.keys(a).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};t["default"]=a},71313:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r=d(n(27629)),o=d(n(68349)),i=d(n(62215)),a=d(n(55490)),u=d(n(78772)),c=n(54444),s=d(n(11277)),l=d(n(45674)),f=n(15954);n(79388);function d(e){return e&&e.__esModule?e:{"default":e}}var p=function(e,t){return e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e,(0,s["default"])("number"!=typeof e?e:(0,l["default"])(e,f.basePlacements))};var h={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,s=e.options,l=n.elements.arrow,d=n.modifiersData.popperOffsets,h=(0,r["default"])(n.placement),v=(0,u["default"])(h),m=[f.left,f.right].indexOf(h)>=0?"height":"width";if(l&&d){var g=p(s.padding,n),y=(0,o["default"])(l),b="y"===v?f.top:f.left,x="y"===v?f.bottom:f.right,w=n.rects.reference[m]+n.rects.reference[v]-d[v]-n.rects.popper[m],_=d[v]-n.rects.reference[v],E=(0,a["default"])(l),N=E?"y"===v?E.clientHeight||0:E.clientWidth||0:0,C=w/2-_/2,S=g[b],O=N-y[m]-g[x],k=N/2-y[m]/2+C,M=(0,c.within)(S,k,O),T=v;n.modifiersData[i]=((t={})[T]=M,t.centerOffset=M-k,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&(0,i["default"])(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};t["default"]=h},54680:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,t.mapToStyles=p;var r=n(15954),o=f(n(55490)),i=f(n(96904)),a=f(n(25890)),u=f(n(40755)),c=f(n(27629)),s=f(n(31686)),l=n(36291);function f(e){return e&&e.__esModule?e:{"default":e}}var d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function p(e){var t,n=e.popper,c=e.popperRect,s=e.placement,f=e.variation,p=e.offsets,h=e.position,v=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,y=e.isFixed,b=p.x,x=void 0===b?0:b,w=p.y,_=void 0===w?0:w,E="function"==typeof g?g({x:x,y:_}):{x:x,y:_};x=E.x,_=E.y;var N=p.hasOwnProperty("x"),C=p.hasOwnProperty("y"),S=r.left,O=r.top,k=window;if(m){var M=(0,o["default"])(n),T="clientHeight",I="clientWidth";if(M===(0,i["default"])(n)&&(M=(0,a["default"])(n),"static"!==(0,u["default"])(M).position&&"absolute"===h&&(T="scrollHeight",I="scrollWidth")),s===r.top||(s===r.left||s===r.right)&&f===r.end)O=r.bottom,_-=(y&&M===k&&k.visualViewport?k.visualViewport.height:M[T])-c.height,_*=v?1:-1;if(s===r.left||(s===r.top||s===r.bottom)&&f===r.end)S=r.right,x-=(y&&M===k&&k.visualViewport?k.visualViewport.width:M[I])-c.width,x*=v?1:-1}var A,P=Object.assign({position:h},m&&d),L=!0===g?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:(0,l.round)(t*r)/r||0,y:(0,l.round)(n*r)/r||0}}({x:x,y:_}):{x:x,y:_};return x=L.x,_=L.y,v?Object.assign({},P,((A={})[O]=C?"0":"",A[S]=N?"0":"",A.transform=(k.devicePixelRatio||1)<=1?"translate("+x+"px, "+_+"px)":"translate3d("+x+"px, "+_+"px, 0)",A)):Object.assign({},P,((t={})[O]=C?_+"px":"",t[S]=N?x+"px":"",t.transform="",t))}var h={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,u=n.roundOffsets,l=void 0===u||u,f={placement:(0,c["default"])(t.placement),variation:(0,s["default"])(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,p(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,p(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};t["default"]=h},53887:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r,o=(r=n(96904))&&r.__esModule?r:{"default":r};var i={passive:!0};var a={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,u=void 0===a||a,c=r.resize,s=void 0===c||c,l=(0,o["default"])(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return u&&f.forEach((function(e){e.addEventListener("scroll",n.update,i)})),s&&l.addEventListener("resize",n.update,i),function(){u&&f.forEach((function(e){e.removeEventListener("scroll",n.update,i)})),s&&l.removeEventListener("resize",n.update,i)}},data:{}};t["default"]=a},82566:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r=l(n(31477)),o=l(n(27629)),i=l(n(44214)),a=l(n(75949)),u=l(n(2894)),c=n(15954),s=l(n(31686));function l(e){return e&&e.__esModule?e:{"default":e}}var f={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var f=n.mainAxis,d=void 0===f||f,p=n.altAxis,h=void 0===p||p,v=n.fallbackPlacements,m=n.padding,g=n.boundary,y=n.rootBoundary,b=n.altBoundary,x=n.flipVariations,w=void 0===x||x,_=n.allowedAutoPlacements,E=t.options.placement,N=(0,o["default"])(E),C=v||(N===E||!w?[(0,r["default"])(E)]:function(e){if((0,o["default"])(e)===c.auto)return[];var t=(0,r["default"])(e);return[(0,i["default"])(e),t,(0,i["default"])(t)]}(E)),S=[E].concat(C).reduce((function(e,n){return e.concat((0,o["default"])(n)===c.auto?(0,u["default"])(t,{placement:n,boundary:g,rootBoundary:y,padding:m,flipVariations:w,allowedAutoPlacements:_}):n)}),[]),O=t.rects.reference,k=t.rects.popper,M=new Map,T=!0,I=S[0],A=0;A=0,j=B?"width":"height",R=(0,a["default"])(t,{placement:P,boundary:g,rootBoundary:y,altBoundary:b,padding:m}),D=B?V?c.right:c.left:V?c.bottom:c.top;O[j]>k[j]&&(D=(0,r["default"])(D));var F=(0,r["default"])(D),K=[];if(d&&K.push(R[L]<=0),h&&K.push(R[D]<=0,R[F]<=0),K.every((function(e){return e}))){I=P,T=!1;break}M.set(P,K)}if(T)for(var Y=function(e){var t=S.find((function(t){var n=M.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return I=t,"break"},z=w?3:1;z>0;z--){if("break"===Y(z))break}t.placement!==I&&(t.modifiersData[l]._skip=!0,t.placement=I,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};t["default"]=f},27353:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r,o=n(15954),i=(r=n(75949))&&r.__esModule?r:{"default":r};function a(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function u(e){return[o.top,o.right,o.bottom,o.left].some((function(t){return e[t]>=0}))}var c={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,c=t.modifiersData.preventOverflow,s=(0,i["default"])(t,{elementContext:"reference"}),l=(0,i["default"])(t,{altBoundary:!0}),f=a(s,r),d=a(l,o,c),p=u(f),h=u(d);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}};t["default"]=c},4207:function(e,t,n){"use strict";t.__esModule=!0,t.preventOverflow=t.popperOffsets=t.offset=t.hide=t.flip=t.eventListeners=t.computeStyles=t.arrow=t.applyStyles=void 0;var r=d(n(89290));t.applyStyles=r["default"];var o=d(n(71313));t.arrow=o["default"];var i=d(n(54680));t.computeStyles=i["default"];var a=d(n(53887));t.eventListeners=a["default"];var u=d(n(82566));t.flip=u["default"];var c=d(n(27353));t.hide=c["default"];var s=d(n(99873));t.offset=s["default"];var l=d(n(83662));t.popperOffsets=l["default"];var f=d(n(21031));function d(e){return e&&e.__esModule?e:{"default":e}}t.preventOverflow=f["default"]},99873:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,t.distanceAndSkiddingToXY=a;var r,o=(r=n(27629))&&r.__esModule?r:{"default":r},i=n(15954);function a(e,t,n){var r=(0,o["default"])(e),a=[i.left,i.top].indexOf(r)>=0?-1:1,u="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=u[0],s=u[1];return c=c||0,s=(s||0)*a,[i.left,i.right].indexOf(r)>=0?{x:s,y:c}:{x:c,y:s}}var u={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,u=void 0===o?[0,0]:o,c=i.placements.reduce((function(e,n){return e[n]=a(n,t.rects,u),e}),{}),s=c[t.placement],l=s.x,f=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=c}};t["default"]=u},83662:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r,o=(r=n(2002))&&r.__esModule?r:{"default":r};var i={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=(0,o["default"])({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};t["default"]=i},21031:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r=n(15954),o=h(n(27629)),i=h(n(78772)),a=h(n(16696)),u=n(54444),c=h(n(68349)),s=h(n(55490)),l=h(n(75949)),f=h(n(31686)),d=h(n(22710)),p=n(36291);function h(e){return e&&e.__esModule?e:{"default":e}}var v={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,h=e.name,v=n.mainAxis,m=void 0===v||v,g=n.altAxis,y=void 0!==g&&g,b=n.boundary,x=n.rootBoundary,w=n.altBoundary,_=n.padding,E=n.tether,N=void 0===E||E,C=n.tetherOffset,S=void 0===C?0:C,O=(0,l["default"])(t,{boundary:b,rootBoundary:x,padding:_,altBoundary:w}),k=(0,o["default"])(t.placement),M=(0,f["default"])(t.placement),T=!M,I=(0,i["default"])(k),A=(0,a["default"])(I),P=t.modifiersData.popperOffsets,L=t.rects.reference,V=t.rects.popper,B="function"==typeof S?S(Object.assign({},t.rects,{placement:t.placement})):S,j="number"==typeof B?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(P){if(m){var F,K="y"===I?r.top:r.left,Y="y"===I?r.bottom:r.right,z="y"===I?"height":"width",U=P[I],H=U+O[K],W=U-O[Y],G=N?-V[z]/2:0,$=M===r.start?L[z]:V[z],q=M===r.start?-V[z]:-L[z],X=t.elements.arrow,Z=N&&X?(0,c["default"])(X):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,d["default"])(),J=Q[K],ee=Q[Y],te=(0,u.within)(0,L[z],Z[z]),ne=T?L[z]/2-G-te-J-j.mainAxis:$-te-J-j.mainAxis,re=T?-L[z]/2+G+te+ee+j.mainAxis:q+te+ee+j.mainAxis,oe=t.elements.arrow&&(0,s["default"])(t.elements.arrow),ie=oe?"y"===I?oe.clientTop||0:oe.clientLeft||0:0,ae=null!=(F=null==R?void 0:R[I])?F:0,ue=U+ne-ae-ie,ce=U+re-ae,se=(0,u.within)(N?(0,p.min)(H,ue):H,U,N?(0,p.max)(W,ce):W);P[I]=se,D[I]=se-U}if(y){var le,fe="x"===I?r.top:r.left,de="x"===I?r.bottom:r.right,pe=P[A],he="y"===A?"height":"width",ve=pe+O[fe],me=pe-O[de],ge=-1!==[r.top,r.left].indexOf(k),ye=null!=(le=null==R?void 0:R[A])?le:0,be=ge?ve:pe-L[he]-V[he]-ye+j.altAxis,xe=ge?pe+L[he]+V[he]-ye-j.altAxis:me,we=N&&ge?(0,u.withinMaxClamp)(be,pe,xe):(0,u.within)(N?be:ve,pe,N?xe:me);P[A]=we,D[A]=we-pe}t.modifiersData[h]=D}},requiresIfExists:["offset"]};t["default"]=v},47952:function(e,t,n){"use strict";t.__esModule=!0,t.defaultModifiers=t.createPopper=void 0;var r=n(21926);t.popperGenerator=r.popperGenerator,t.detectOverflow=r.detectOverflow;var o=c(n(53887)),i=c(n(83662)),a=c(n(54680)),u=c(n(89290));function c(e){return e&&e.__esModule?e:{"default":e}}var s=[o["default"],i["default"],a["default"],u["default"]];t.defaultModifiers=s;var l=(0,r.popperGenerator)({defaultModifiers:s});t.createPopper=l},17827:function(e,t,n){"use strict";t.__esModule=!0;var r={createPopper:!0,createPopperLite:!0,defaultModifiers:!0,popperGenerator:!0,detectOverflow:!0};t.defaultModifiers=t.createPopperLite=t.createPopper=void 0;var o=n(21926);t.popperGenerator=o.popperGenerator,t.detectOverflow=o.detectOverflow;var i=m(n(53887)),a=m(n(83662)),u=m(n(54680)),c=m(n(89290)),s=m(n(99873)),l=m(n(82566)),f=m(n(21031)),d=m(n(71313)),p=m(n(27353)),h=n(47952);t.createPopperLite=h.createPopper;var v=n(4207);function m(e){return e&&e.__esModule?e:{"default":e}}Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===v[e]||(t[e]=v[e]))}));var g=[i["default"],a["default"],u["default"],c["default"],s["default"],l["default"],f["default"],d["default"],p["default"]];t.defaultModifiers=g;var y=(0,o.popperGenerator)({defaultModifiers:g});t.createPopperLite=t.createPopper=y},2894:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t){void 0===t&&(t={});var n=t,u=n.placement,c=n.boundary,s=n.rootBoundary,l=n.padding,f=n.flipVariations,d=n.allowedAutoPlacements,p=void 0===d?o.placements:d,h=(0,r["default"])(u),v=h?f?o.variationPlacements:o.variationPlacements.filter((function(e){return(0,r["default"])(e)===h})):o.basePlacements,m=v.filter((function(e){return p.indexOf(e)>=0}));0===m.length&&(m=v);var g=m.reduce((function(t,n){return t[n]=(0,i["default"])(e,{placement:n,boundary:c,rootBoundary:s,padding:l})[(0,a["default"])(n)],t}),{});return Object.keys(g).sort((function(e,t){return g[e]-g[t]}))};var r=u(n(31686)),o=n(15954),i=u(n(75949)),a=u(n(27629));function u(e){return e&&e.__esModule?e:{"default":e}}},2002:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t,n=e.reference,u=e.element,c=e.placement,s=c?(0,r["default"])(c):null,l=c?(0,o["default"])(c):null,f=n.x+n.width/2-u.width/2,d=n.y+n.height/2-u.height/2;switch(s){case a.top:t={x:f,y:n.y-u.height};break;case a.bottom:t={x:f,y:n.y+n.height};break;case a.right:t={x:n.x+n.width,y:d};break;case a.left:t={x:n.x-u.width,y:d};break;default:t={x:n.x,y:n.y}}var p=s?(0,i["default"])(s):null;if(null!=p){var h="y"===p?"height":"width";switch(l){case a.start:t[p]=t[p]-(n[h]/2-u[h]/2);break;case a.end:t[p]=t[p]+(n[h]/2-u[h]/2)}}return t};var r=u(n(27629)),o=u(n(31686)),i=u(n(78772)),a=n(15954);function u(e){return e&&e.__esModule?e:{"default":e}}},27672:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=undefined,n(e())}))}))),t}}},75949:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t){void 0===t&&(t={});var n=t,d=n.placement,p=void 0===d?e.placement:d,h=n.boundary,v=void 0===h?c.clippingParents:h,m=n.rootBoundary,g=void 0===m?c.viewport:m,y=n.elementContext,b=void 0===y?c.popper:y,x=n.altBoundary,w=void 0!==x&&x,_=n.padding,E=void 0===_?0:_,N=(0,l["default"])("number"!=typeof E?E:(0,f["default"])(E,c.basePlacements)),C=b===c.popper?c.reference:c.popper,S=e.rects.popper,O=e.elements[w?C:b],k=(0,r["default"])((0,s.isElement)(O)?O:O.contextElement||(0,o["default"])(e.elements.popper),v,g),M=(0,i["default"])(e.elements.reference),T=(0,a["default"])({reference:M,element:S,strategy:"absolute",placement:p}),I=(0,u["default"])(Object.assign({},S,T)),A=b===c.popper?I:M,P={top:k.top-A.top+N.top,bottom:A.bottom-k.bottom+N.bottom,left:k.left-A.left+N.left,right:A.right-k.right+N.right},L=e.modifiersData.offset;if(b===c.popper&&L){var V=L[p];Object.keys(P).forEach((function(e){var t=[c.right,c.bottom].indexOf(e)>=0?1:-1,n=[c.top,c.bottom].indexOf(e)>=0?"y":"x";P[e]+=V[n]*t}))}return P};var r=d(n(65647)),o=d(n(25890)),i=d(n(11100)),a=d(n(2002)),u=d(n(73060)),c=n(15954),s=n(79388),l=d(n(11277)),f=d(n(45674));function d(e){return e&&e.__esModule?e:{"default":e}}},45674:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}},80885:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0?"x":"y"}},31477:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return e.replace(/left|right|bottom|top/g,(function(e){return n[e]}))};var n={left:"right",right:"left",bottom:"top",top:"bottom"}},44214:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return e.replace(/start|end/g,(function(e){return n[e]}))};var n={start:"end",end:"start"}},31686:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return e.split("-")[1]}},36291:function(e,t){"use strict";t.__esModule=!0,t.round=t.min=t.max=void 0;var n=Math.max;t.max=n;var r=Math.min;t.min=r;var o=Math.round;t.round=o},54220:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}},11277:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return Object.assign({},(0,o["default"])(),e)};var r,o=(r=n(22710))&&r.__esModule?r:{"default":r}},69282:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=function(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}(e);return r.modifierPhases.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])};var r=n(15954)},73060:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}},12459:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){var n=new Set;return e.filter((function(e){var r=t(e);if(!n.has(r))return n.add(r),!0}))}},30752:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){e.forEach((function(t){[].concat(Object.keys(t),i).filter((function(e,t,n){return n.indexOf(e)===t})).forEach((function(n){switch(n){case"name":t.name;break;case"enabled":t.enabled;break;case"phase":o.modifierPhases.indexOf(t.phase);break;case"fn":t.fn;break;case"effect":null!=t.effect&&t.effect;break;case"requires":null!=t.requires&&Array.isArray(t.requires);break;case"requiresIfExists":Array.isArray(t.requiresIfExists)}t.requires&&t.requires.forEach((function(t){e.find((function(e){return e.name===t}))}))}))}))};(r=n(80885))&&r.__esModule;var r,o=n(15954);var i=["name","enabled","phase","fn","effect","requires","options"]},54444:function(e,t,n){"use strict";t.__esModule=!0,t.within=o,t.withinMaxClamp=function(e,t,n){var r=o(e,t,n);return r>n?n:r};var r=n(36291);function o(e,t,n){return(0,r.max)(e,(0,r.min)(t,n))}},34963:function(e,t,n){"use strict";var r=n(78427),o=n(39580),i=n(43553),a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a function")}},57564:function(e,t,n){"use strict";var r=n(78427),o=n(8623),i=n(43553),a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a constructor")}},46509:function(e,t,n){"use strict";var r=n(78427),o=n(39580),i=r.String,a=r.TypeError;e.exports=function(e){if("object"==typeof e||o(e))return e;throw a("Can't set "+i(e)+" as a prototype")}},89190:function(e,t,n){"use strict";var r=n(16417),o=n(79751),i=n(45988),a=r("unscopables"),u=Array.prototype;u[a]==undefined&&i.f(u,a,{configurable:!0,value:o(null)}),e.exports=function(e){u[a][e]=!0}},56405:function(e,t,n){"use strict";var r=n(82257).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},4:function(e,t,n){"use strict";var r=n(78427),o=n(61170),i=r.TypeError;e.exports=function(e,t){if(o(t,e))return e;throw i("Incorrect invocation")}},66970:function(e,t,n){"use strict";var r=n(78427),o=n(7174),i=r.String,a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not an object")}},70047:function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},67603:function(e,t,n){"use strict";var r=n(43831);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},39187:function(e,t,n){"use strict";var r,o,i,a=n(70047),u=n(35843),c=n(78427),s=n(39580),l=n(7174),f=n(83761),d=n(99310),p=n(43553),h=n(60163),v=n(52929),m=n(45988).f,g=n(61170),y=n(93577),b=n(87421),x=n(16417),w=n(73638),_=c.Int8Array,E=_&&_.prototype,N=c.Uint8ClampedArray,C=N&&N.prototype,S=_&&y(_),O=E&&y(E),k=Object.prototype,M=c.TypeError,T=x("toStringTag"),I=w("TYPED_ARRAY_TAG"),A=w("TYPED_ARRAY_CONSTRUCTOR"),P=a&&!!b&&"Opera"!==d(c.opera),L=!1,V={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},j=function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||f(V,t)||f(B,t)},R=function(e){if(!l(e))return!1;var t=d(e);return f(V,t)||f(B,t)};for(r in V)(i=(o=c[r])&&o.prototype)?h(i,A,o):P=!1;for(r in B)(i=(o=c[r])&&o.prototype)&&h(i,A,o);if((!P||!s(S)||S===Function.prototype)&&(S=function(){throw M("Incorrect invocation")},P))for(r in V)c[r]&&b(c[r],S);if((!P||!O||O===k)&&(O=S.prototype,P))for(r in V)c[r]&&b(c[r].prototype,O);if(P&&y(C)!==O&&b(C,O),u&&!f(O,T))for(r in L=!0,m(O,T,{get:function(){return l(this)?this[I]:undefined}}),V)c[r]&&h(c[r],I,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_CONSTRUCTOR:A,TYPED_ARRAY_TAG:L&&I,aTypedArray:function(e){if(R(e))return e;throw M("Target is not a typed array")},aTypedArrayConstructor:function(e){if(s(e)&&(!b||g(S,e)))return e;throw M(p(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(u){if(n)for(var o in V){var i=c[o];if(i&&f(i.prototype,e))try{delete i.prototype[e]}catch(a){try{i.prototype[e]=t}catch(s){}}}O[e]&&!n||v(O,e,n?t:P&&E[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(u){if(b){if(n)for(r in V)if((o=c[r])&&f(o,e))try{delete o[e]}catch(i){}if(S[e]&&!n)return;try{return v(S,e,n?t:P&&S[e]||t)}catch(i){}}for(r in V)!(o=c[r])||o[e]&&!n||v(o,e,t)}},isView:j,isTypedArray:R,TypedArray:S,TypedArrayPrototype:O}},92215:function(e,t,n){"use strict";var r=n(78427),o=n(36500),i=n(35843),a=n(70047),u=n(53696),c=n(60163),s=n(79677),l=n(43831),f=n(4),d=n(33569),p=n(7291),h=n(42226),v=n(15808),m=n(93577),g=n(87421),y=n(3547).f,b=n(45988).f,x=n(56272),w=n(43902),_=n(52302),E=n(52576),N=u.PROPER,C=u.CONFIGURABLE,S=E.get,O=E.set,k="ArrayBuffer",M="DataView",T="Wrong index",I=r.ArrayBuffer,A=I,P=A&&A.prototype,L=r.DataView,V=L&&L.prototype,B=Object.prototype,j=r.Array,R=r.RangeError,D=o(x),F=o([].reverse),K=v.pack,Y=v.unpack,z=function(e){return[255&e]},U=function(e){return[255&e,e>>8&255]},H=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},W=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},G=function(e){return K(e,23,4)},$=function(e){return K(e,52,8)},q=function(e,t){b(e.prototype,t,{get:function(){return S(this)[t]}})},X=function(e,t,n,r){var o=h(n),i=S(e);if(o+t>i.byteLength)throw R(T);var a=S(i.buffer).bytes,u=o+i.byteOffset,c=w(a,u,u+t);return r?c:F(c)},Z=function(e,t,n,r,o,i){var a=h(n),u=S(e);if(a+t>u.byteLength)throw R(T);for(var c=S(u.buffer).bytes,s=a+u.byteOffset,l=r(+o),f=0;fte;)(J=ee[te++])in A||c(A,J,I[J]);P.constructor=A}g&&m(V)!==B&&g(V,B);var ne=new L(new A(2)),re=o(V.setInt8);ne.setInt8(0,2147483648),ne.setInt8(1,2147483649),!ne.getInt8(0)&&ne.getInt8(1)||s(V,{setInt8:function(e,t){re(this,e,t<<24>>24)},setUint8:function(e,t){re(this,e,t<<24>>24)}},{unsafe:!0})}else P=(A=function(e){f(this,P);var t=h(e);O(this,{bytes:D(j(t),0),byteLength:t}),i||(this.byteLength=t)}).prototype,V=(L=function(e,t,n){f(this,V),f(e,P);var r=S(e).byteLength,o=d(t);if(o<0||o>r)throw R("Wrong offset");if(o+(n=n===undefined?r-o:p(n))>r)throw R("Wrong length");O(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)}).prototype,i&&(q(A,"byteLength"),q(L,"buffer"),q(L,"byteLength"),q(L,"byteOffset")),s(V,{getInt8:function(e){return X(this,1,e)[0]<<24>>24},getUint8:function(e){return X(this,1,e)[0]},getInt16:function(e){var t=X(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=X(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return W(X(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return W(X(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return Y(X(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return Y(X(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){Z(this,1,e,z,t)},setUint8:function(e,t){Z(this,1,e,z,t)},setInt16:function(e,t){Z(this,2,e,U,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){Z(this,2,e,U,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){Z(this,4,e,H,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){Z(this,4,e,H,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){Z(this,4,e,G,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){Z(this,8,e,$,t,arguments.length>2?arguments[2]:undefined)}});_(A,k),_(L,M),e.exports={ArrayBuffer:A,DataView:L}},18770:function(e,t,n){"use strict";var r=n(60855),o=n(55371),i=n(47558),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),u=i(n),c=o(e,u),s=o(t,u),l=arguments.length>2?arguments[2]:undefined,f=a((l===undefined?u:o(l,u))-s,u-c),d=1;for(s0;)s in n?n[c]=n[s]:delete n[c],c+=d,s+=d;return n}},56272:function(e,t,n){"use strict";var r=n(60855),o=n(55371),i=n(47558);e.exports=function(e){for(var t=r(this),n=i(t),a=arguments.length,u=o(a>1?arguments[1]:undefined,n),c=a>2?arguments[2]:undefined,s=c===undefined?n:o(c,n);s>u;)t[u++]=e;return t}},19465:function(e,t,n){"use strict";var r=n(73266).forEach,o=n(66681)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}},45331:function(e,t,n){"use strict";var r=n(47558);e.exports=function(e,t){for(var n=0,o=r(t),i=new e(o);o>n;)i[n]=t[n++];return i}},65422:function(e,t,n){"use strict";var r=n(78427),o=n(98045),i=n(10878),a=n(60855),u=n(45910),c=n(81094),s=n(8623),l=n(47558),f=n(73746),d=n(66570),p=n(31491),h=r.Array;e.exports=function(e){var t=a(e),n=s(this),r=arguments.length,v=r>1?arguments[1]:undefined,m=v!==undefined;m&&(v=o(v,r>2?arguments[2]:undefined));var g,y,b,x,w,_,E=p(t),N=0;if(!E||this==h&&c(E))for(g=l(t),y=n?new this(g):h(g);g>N;N++)_=m?v(t[N],N):t[N],f(y,N,_);else for(w=(x=d(t,E)).next,y=n?new this:[];!(b=i(w,x)).done;N++)_=m?u(x,v,[b.value,N],!0):b.value,f(y,N,_);return y.length=N,y}},31170:function(e,t,n){"use strict";var r=n(10569),o=n(55371),i=n(47558),a=function(e){return function(t,n,a){var u,c=r(t),s=i(c),l=o(a,s);if(e&&n!=n){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},73266:function(e,t,n){"use strict";var r=n(98045),o=n(36500),i=n(66122),a=n(60855),u=n(47558),c=n(55886),s=o([].push),l=function(e){var t=1==e,n=2==e,o=3==e,l=4==e,f=6==e,d=7==e,p=5==e||f;return function(h,v,m,g){for(var y,b,x=a(h),w=i(x),_=r(v,m),E=u(w),N=0,C=g||c,S=t?C(h,E):n||d?C(h,0):undefined;E>N;N++)if((p||N in w)&&(b=_(y=w[N],N,x),e))if(t)S[N]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return N;case 2:s(S,y)}else switch(e){case 4:return!1;case 7:s(S,y)}return f?-1:o||l?l:S}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},63277:function(e,t,n){"use strict";var r=n(40353),o=n(10569),i=n(33569),a=n(47558),u=n(66681),c=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,f=u("lastIndexOf"),d=l||!f;e.exports=d?function(e){if(l)return r(s,this,arguments)||0;var t=o(this),n=a(t),u=n-1;for(arguments.length>1&&(u=c(u,i(arguments[1]))),u<0&&(u=n+u);u>=0;u--)if(u in t&&t[u]===e)return u||0;return-1}:s},67030:function(e,t,n){"use strict";var r=n(43831),o=n(16417),i=n(28499),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},66681:function(e,t,n){"use strict";var r=n(43831);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},4917:function(e,t,n){"use strict";var r=n(78427),o=n(34963),i=n(60855),a=n(66122),u=n(47558),c=r.TypeError,s=function(e){return function(t,n,r,s){o(n);var l=i(t),f=a(l),d=u(l),p=e?d-1:0,h=e?-1:1;if(r<2)for(;;){if(p in f){s=f[p],p+=h;break}if(p+=h,e?p<0:d<=p)throw c("Reduce of empty array with no initial value")}for(;e?p>=0:d>p;p+=h)p in f&&(s=n(s,f[p],p,l));return s}};e.exports={left:s(!1),right:s(!0)}},43902:function(e,t,n){"use strict";var r=n(78427),o=n(55371),i=n(47558),a=n(73746),u=r.Array,c=Math.max;e.exports=function(e,t,n){for(var r=i(e),s=o(t,r),l=o(n===undefined?r:n,r),f=u(c(l-s,0)),d=0;s0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},a=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,u=0;a1?arguments[1]:undefined);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),i(p,n?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),f&&r(p,"size",{get:function(){return m(this).size}}),l},setStrong:function(e,t,n){var r=t+" Iterator",o=v(t),i=v(r);s(e,t,(function(e,t){h(this,{type:r,target:e,state:o(e),kind:t,last:undefined})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),l(t)}}},83196:function(e,t,n){"use strict";var r=n(36500),o=n(79677),i=n(54915).getWeakData,a=n(66970),u=n(7174),c=n(4),s=n(98470),l=n(73266),f=n(83761),d=n(52576),p=d.set,h=d.getterFor,v=l.find,m=l.findIndex,g=r([].splice),y=0,b=function(e){return e.frozen||(e.frozen=new x)},x=function(){this.entries=[]},w=function(e,t){return v(e.entries,(function(e){return e[0]===t}))};x.prototype={get:function(e){var t=w(this,e);if(t)return t[1]},has:function(e){return!!w(this,e)},set:function(e,t){var n=w(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=m(this.entries,(function(t){return t[0]===e}));return~t&&g(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var l=e((function(e,o){c(e,d),p(e,{type:t,id:y++,frozen:undefined}),o!=undefined&&s(o,e[r],{that:e,AS_ENTRIES:n})})),d=l.prototype,v=h(t),m=function(e,t,n){var r=v(e),o=i(a(t),!0);return!0===o?b(r).set(t,n):o[r.id]=n,e};return o(d,{"delete":function(e){var t=v(this);if(!u(e))return!1;var n=i(e);return!0===n?b(t)["delete"](e):n&&f(n,t.id)&&delete n[t.id]},has:function(e){var t=v(this);if(!u(e))return!1;var n=i(e);return!0===n?b(t).has(e):n&&f(n,t.id)}}),o(d,n?{get:function(e){var t=v(this);if(u(e)){var n=i(e);return!0===n?b(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return m(this,e,t)}}:{add:function(e){return m(this,e,!0)}}),l}}},43497:function(e,t,n){"use strict";var r=n(76586),o=n(78427),i=n(36500),a=n(89753),u=n(52929),c=n(54915),s=n(98470),l=n(4),f=n(39580),d=n(7174),p=n(43831),h=n(56980),v=n(52302),m=n(58803);e.exports=function(e,t,n){var g=-1!==e.indexOf("Map"),y=-1!==e.indexOf("Weak"),b=g?"set":"add",x=o[e],w=x&&x.prototype,_=x,E={},N=function(e){var t=i(w[e]);u(w,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return y&&!d(e)?undefined:t(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!d(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!f(x)||!(y||w.forEach&&!p((function(){(new x).entries().next()})))))_=n.getConstructor(t,e,g,b),c.enable();else if(a(e,!0)){var C=new _,S=C[b](y?{}:-0,1)!=C,O=p((function(){C.has(1)})),k=h((function(e){new x(e)})),M=!y&&p((function(){for(var e=new x,t=5;t--;)e[b](t,t);return!e.has(-0)}));k||((_=t((function(e,t){l(e,w);var n=m(new x,e,_);return t!=undefined&&s(t,n[b],{that:n,AS_ENTRIES:g}),n}))).prototype=w,w.constructor=_),(O||M)&&(N("delete"),N("has"),g&&N("get")),(M||S)&&N(b),y&&w.clear&&delete w.clear}return E[e]=_,r({global:!0,constructor:!0,forced:_!=x},E),v(_,e),y||n.setStrong(_,e,g),_}},35311:function(e,t,n){"use strict";var r=n(83761),o=n(63790),i=n(16042),a=n(45988);e.exports=function(e,t,n){for(var u=o(t),c=a.f,s=i.f,l=0;l"+c+""}},70259:function(e,t,n){"use strict";var r=n(41903).IteratorPrototype,o=n(79751),i=n(10990),a=n(52302),u=n(91673),c=function(){return this};e.exports=function(e,t,n,s){var l=t+" Iterator";return e.prototype=o(r,{next:i(+!s,n)}),a(e,l,!1,!0),u[l]=c,e}},60163:function(e,t,n){"use strict";var r=n(35843),o=n(45988),i=n(10990);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},10990:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},73746:function(e,t,n){"use strict";var r=n(40514),o=n(45988),i=n(10990);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},68191:function(e,t,n){"use strict";var r=n(78427),o=n(36500),i=n(43831),a=n(83639).start,u=r.RangeError,c=Math.abs,s=Date.prototype,l=s.toISOString,f=o(s.getTime),d=o(s.getUTCDate),p=o(s.getUTCFullYear),h=o(s.getUTCHours),v=o(s.getUTCMilliseconds),m=o(s.getUTCMinutes),g=o(s.getUTCMonth),y=o(s.getUTCSeconds);e.exports=i((function(){return"0385-07-25T07:06:39.999Z"!=l.call(new Date(-50000000000001))}))||!i((function(){l.call(new Date(NaN))}))?function(){if(!isFinite(f(this)))throw u("Invalid time value");var e=this,t=p(e),n=v(e),r=t<0?"-":t>9999?"+":"";return r+a(c(t),r?6:4,0)+"-"+a(g(e)+1,2,0)+"-"+a(d(e),2,0)+"T"+a(h(e),2,0)+":"+a(m(e),2,0)+":"+a(y(e),2,0)+"."+a(n,3,0)+"Z"}:l},49926:function(e,t,n){"use strict";var r=n(78427),o=n(66970),i=n(51148),a=r.TypeError;e.exports=function(e){if(o(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw a("Incorrect hint");return i(this,e)}},26790:function(e,t,n){"use strict";var r=n(94668),o=n(45988);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),o.f(e,t,n)}},52929:function(e,t,n){"use strict";var r=n(78427),o=n(39580),i=n(60163),a=n(94668),u=n(95749);e.exports=function(e,t,n,c){var s=!!c&&!!c.unsafe,l=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet,d=c&&c.name!==undefined?c.name:t;return o(n)&&a(n,d,c),e===r?(l?e[t]=n:u(t,n),e):(s?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=n:i(e,t,n),e)}},79677:function(e,t,n){"use strict";var r=n(52929);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},89853:function(e,t,n){"use strict";var r=n(76586),o=n(10878),i=n(45026),a=n(53696),u=n(39580),c=n(70259),s=n(93577),l=n(87421),f=n(52302),d=n(60163),p=n(52929),h=n(16417),v=n(91673),m=n(41903),g=a.PROPER,y=a.CONFIGURABLE,b=m.IteratorPrototype,x=m.BUGGY_SAFARI_ITERATORS,w=h("iterator"),_="keys",E="values",N="entries",C=function(){return this};e.exports=function(e,t,n,a,h,m,S){c(n,t,a);var O,k,M,T=function(e){if(e===h&&V)return V;if(!x&&e in P)return P[e];switch(e){case _:case E:case N:return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",A=!1,P=e.prototype,L=P[w]||P["@@iterator"]||h&&P[h],V=!x&&L||T(h),B="Array"==t&&P.entries||L;if(B&&(O=s(B.call(new e)))!==Object.prototype&&O.next&&(i||s(O)===b||(l?l(O,b):u(O[w])||p(O,w,C)),f(O,I,!0,!0),i&&(v[I]=C)),g&&h==E&&L&&L.name!==E&&(!i&&y?d(P,"name",E):(A=!0,V=function(){return o(L,this)})),h)if(k={values:T(E),keys:m?V:T(_),entries:T(N)},S)for(M in k)(x||A||!(M in P))&&p(P,M,k[M]);else r({target:t,proto:!0,forced:x||A},k);return i&&!S||P[w]===V||p(P,w,V,{name:h}),v[t]=V,k}},39719:function(e,t,n){"use strict";var r=n(4763),o=n(83761),i=n(21888),a=n(45988).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},35843:function(e,t,n){"use strict";var r=n(43831);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},59289:function(e,t,n){"use strict";var r=n(78427),o=n(7174),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},10196:function(e,t,n){"use strict";var r=n(91528).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},40109:function(e){"use strict";e.exports="object"==typeof window&&"object"!=typeof Deno},42997:function(e,t,n){"use strict";var r=n(91528);e.exports=/MSIE|Trident/.test(r)},12739:function(e,t,n){"use strict";var r=n(91528),o=n(78427);e.exports=/ipad|iphone|ipod/i.test(r)&&o.Pebble!==undefined},88249:function(e,t,n){"use strict";var r=n(91528);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},23526:function(e,t,n){"use strict";var r=n(3775),o=n(78427);e.exports="process"==r(o.process)},33901:function(e,t,n){"use strict";var r=n(91528);e.exports=/web0s(?!.*chrome)/i.test(r)},91528:function(e,t,n){"use strict";var r=n(4069);e.exports=r("navigator","userAgent")||""},28499:function(e,t,n){"use strict";var r,o,i=n(78427),a=n(91528),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,l=s&&s.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},92529:function(e,t,n){"use strict";var r=n(91528).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},46458:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},19372:function(e,t,n){"use strict";var r=n(43831),o=n(10990);e.exports=!r((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},76586:function(e,t,n){"use strict";var r=n(78427),o=n(16042).f,i=n(60163),a=n(52929),u=n(95749),c=n(35311),s=n(89753);e.exports=function(e,t){var n,l,f,d,p,h=e.target,v=e.global,m=e.stat;if(n=v?r:m?r[h]||u(h,{}):(r[h]||{}).prototype)for(l in t){if(d=t[l],f=e.noTargetGet?(p=o(n,l))&&p.value:n[l],!s(v?l:h+(m?".":"#")+l,e.forced)&&f!==undefined){if(typeof d==typeof f)continue;c(d,f)}(e.sham||f&&f.sham)&&i(d,"sham",!0),a(n,l,d,e)}}},43831:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},65284:function(e,t,n){"use strict";n(79367);var r=n(36500),o=n(52929),i=n(11642),a=n(43831),u=n(16417),c=n(60163),s=u("species"),l=RegExp.prototype;e.exports=function(e,t,n,f){var d=u(e),p=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=p&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!p||!h||n){var v=r(/./[d]),m=t(d,""[e],(function(e,t,n,o,a){var u=r(e),c=t.exec;return c===i||c===l.exec?p&&!a?{done:!0,value:v(t,n,o)}:{done:!0,value:u(n,t,o)}:{done:!1}}));o(String.prototype,e,m[0]),o(l,d,m[1])}f&&c(l[d],"sham",!0)}},98600:function(e,t,n){"use strict";var r=n(78427),o=n(86905),i=n(47558),a=n(98045),u=r.TypeError;e.exports=function c(e,t,n,r,s,l,f,d){for(var p,h=s,v=0,m=!!f&&a(f,d);v0&&o(p))h=c(e,t,p,i(p),h,l-1)-1;else{if(h>=9007199254740991)throw u("Exceed the acceptable array length");e[h]=p}h++}v++}return h}},37726:function(e,t,n){"use strict";var r=n(43831);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},40353:function(e,t,n){"use strict";var r=n(53027),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},98045:function(e,t,n){"use strict";var r=n(36500),o=n(34963),i=n(53027),a=r(r.bind);e.exports=function(e,t){return o(e),t===undefined?e:i?a(e,t):function(){return e.apply(t,arguments)}}},53027:function(e,t,n){"use strict";var r=n(43831);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},19012:function(e,t,n){"use strict";var r=n(78427),o=n(36500),i=n(34963),a=n(7174),u=n(83761),c=n(44684),s=n(53027),l=r.Function,f=o([].concat),d=o([].join),p={},h=function(e,t,n){if(!u(p,t)){for(var r=[],o=0;o]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,f,d){var p=n+e.length,h=r.length,v=l;return f!==undefined&&(f=o(f),v=s),u(d,v,(function(o,u){var s;switch(a(u,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,n);case"'":return c(t,p);case"<":s=f[c(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>h){var d=i(l/10);return 0===d?o:d<=h?r[d-1]===undefined?a(u,1):r[d-1]+a(u,1):o}s=r[l-1]}return s===undefined?"":s}))}},78427:function(e,t,n){"use strict";var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},83761:function(e,t,n){"use strict";var r=n(36500),o=n(60855),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},39833:function(e){"use strict";e.exports={}},57298:function(e,t,n){"use strict";var r=n(78427);e.exports=function(e,t){var n=r.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},83099:function(e,t,n){"use strict";var r=n(4069);e.exports=r("document","documentElement")},77103:function(e,t,n){"use strict";var r=n(35843),o=n(43831),i=n(59289);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},15808:function(e,t,n){"use strict";var r=n(78427).Array,o=Math.abs,i=Math.pow,a=Math.floor,u=Math.log,c=Math.LN2;e.exports={pack:function(e,t,n){var s,l,f,d=r(n),p=8*n-t-1,h=(1<>1,m=23===t?i(2,-24)-i(2,-77):0,g=e<0||0===e&&1/e<0?1:0,y=0;for((e=o(e))!=e||e===Infinity?(l=e!=e?1:0,s=h):(s=a(u(e)/c),e*(f=i(2,-s))<1&&(s--,f*=2),(e+=s+v>=1?m/f:m*i(2,1-v))*f>=2&&(s++,f/=2),s+v>=h?(l=0,s=h):s+v>=1?(l=(e*f-1)*i(2,t),s+=v):(l=e*i(2,v-1)*i(2,t),s=0));t>=8;)d[y++]=255&l,l/=256,t-=8;for(s=s<0;)d[y++]=255&s,s/=256,p-=8;return d[--y]|=128*g,d},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,a=(1<>1,c=o-7,s=r-1,l=e[s--],f=127&l;for(l>>=7;c>0;)f=256*f+e[s--],c-=8;for(n=f&(1<<-c)-1,f>>=-c,c+=t;c>0;)n=256*n+e[s--],c-=8;if(0===f)f=1-u;else{if(f===a)return n?NaN:l?-Infinity:Infinity;n+=i(2,t),f-=u}return(l?-1:1)*n*i(2,f-t)}}},66122:function(e,t,n){"use strict";var r=n(78427),o=n(36500),i=n(43831),a=n(3775),u=r.Object,c=o("".split);e.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?c(e,""):u(e)}:u},58803:function(e,t,n){"use strict";var r=n(39580),o=n(7174),i=n(87421);e.exports=function(e,t,n){var a,u;return i&&r(a=t.constructor)&&a!==n&&o(u=a.prototype)&&u!==n.prototype&&i(e,u),e}},91368:function(e,t,n){"use strict";var r=n(36500),o=n(39580),i=n(70836),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},64011:function(e,t,n){"use strict";var r=n(7174),o=n(60163);e.exports=function(e,t){r(t)&&"cause"in t&&o(e,"cause",t.cause)}},54915:function(e,t,n){"use strict";var r=n(76586),o=n(36500),i=n(39833),a=n(7174),u=n(83761),c=n(45988).f,s=n(3547),l=n(61726),f=n(50566),d=n(73638),p=n(37726),h=!1,v=d("meta"),m=0,g=function(e){c(e,v,{value:{objectID:"O"+m++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},h=!0;var e=s.f,t=o([].splice),n={};n[v]=1,e(n).length&&(s.f=function(n){for(var r=e(n),o=0,i=r.length;oy;y++)if((x=M(e[y]))&&l(m,x))return x;return new v(!1)}r=f(e,g)}for(w=r.next;!(_=i(w,r)).done;){try{x=M(_.value)}catch(T){p(r,"throw",T)}if("object"==typeof x&&x&&l(m,x))return x}return new v(!1)}},14099:function(e,t,n){"use strict";var r=n(10878),o=n(66970),i=n(23375);e.exports=function(e,t,n){var a,u;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(c){u=!0,a=c}if("throw"===t)throw n;if(u)throw a;return o(a),n}},41903:function(e,t,n){"use strict";var r,o,i,a=n(43831),u=n(39580),c=n(79751),s=n(93577),l=n(52929),f=n(16417),d=n(45026),p=f("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):h=!0),r==undefined||a((function(){var e={};return r[p].call(e)!==e}))?r={}:d&&(r=c(r)),u(r[p])||l(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},91673:function(e){"use strict";e.exports={}},47558:function(e,t,n){"use strict";var r=n(7291);e.exports=function(e){return r(e.length)}},94668:function(e,t,n){"use strict";var r=n(43831),o=n(39580),i=n(83761),a=n(35843),u=n(53696).CONFIGURABLE,c=n(91368),s=n(52576),l=s.enforce,f=s.get,d=Object.defineProperty,p=a&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),h=String(String).split("String"),v=e.exports=function(e,t,n){if("Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!i(e,"name")||u&&e.name!==t)&&d(e,"name",{value:t,configurable:!0}),p&&n&&i(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity}),n&&i(n,"constructor")&&n.constructor){if(a)try{d(e,"prototype",{writable:!1})}catch(o){}}else e.prototype=undefined;var r=l(e);return i(r,"source")||(r.source=h.join("string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return o(this)&&f(this).source||c(this)}),"toString")},34636:function(e){"use strict";var t=Math.expm1,n=Math.exp;e.exports=!t||t(10)>22025.465794806718||t(10)<22025.465794806718||-2e-17!=t(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:n(e)-1}:t},42634:function(e,t,n){"use strict";var r=n(28213),o=Math.abs,i=Math.pow,a=i(2,-52),u=i(2,-23),c=i(2,127)*(2-u),s=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=o(e),l=r(e);return ic||n!=n?l*Infinity:l*n}},99739:function(e){"use strict";var t=Math.log,n=Math.LOG10E;e.exports=Math.log10||function(e){return t(e)*n}},29295:function(e){"use strict";var t=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:t(1+e)}},28213:function(e){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},87855:function(e,t,n){"use strict";var r,o,i,a,u,c,s,l,f=n(78427),d=n(98045),p=n(16042).f,h=n(41137).set,v=n(88249),m=n(12739),g=n(33901),y=n(23526),b=f.MutationObserver||f.WebKitMutationObserver,x=f.document,w=f.process,_=f.Promise,E=p(f,"queueMicrotask"),N=E&&E.value;N||(r=function(){var e,t;for(y&&(e=w.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(n){throw o?a():i=undefined,n}}i=undefined,e&&e.enter()},v||y||g||!b||!x?!m&&_&&_.resolve?((s=_.resolve(undefined)).constructor=_,l=d(s.then,s),a=function(){l(r)}):y?a=function(){w.nextTick(r)}:(h=d(h,f),a=function(){h(r)}):(u=!0,c=x.createTextNode(""),new b(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),e.exports=N||function(e){var t={fn:e,next:undefined};i&&(i.next=t),o||(o=t,a()),i=t}},99795:function(e,t,n){"use strict";var r=n(16409);e.exports=r&&!!Symbol["for"]&&!!Symbol.keyFor},16409:function(e,t,n){"use strict";var r=n(28499),o=n(43831);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},41810:function(e,t,n){"use strict";var r=n(78427),o=n(39580),i=n(91368),a=r.WeakMap;e.exports=o(a)&&/native code/.test(i(a))},29469:function(e,t,n){"use strict";var r=n(34963),o=function(e){var t,n;this.promise=new e((function(e,r){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},97306:function(e,t,n){"use strict";var r=n(99775);e.exports=function(e,t){return e===undefined?arguments.length<2?"":t:r(e)}},22617:function(e,t,n){"use strict";var r=n(78427),o=n(32169),i=r.TypeError;e.exports=function(e){if(o(e))throw i("The method doesn't accept regular expressions");return e}},37795:function(e,t,n){"use strict";var r=n(78427).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&r(e)}},93510:function(e,t,n){"use strict";var r=n(78427),o=n(43831),i=n(36500),a=n(99775),u=n(78800).trim,c=n(44966),s=i("".charAt),l=r.parseFloat,f=r.Symbol,d=f&&f.iterator,p=1/l(c+"-0")!=-Infinity||d&&!o((function(){l(Object(d))}));e.exports=p?function(e){var t=u(a(e)),n=l(t);return 0===n&&"-"==s(t,0)?-0:n}:l},56934:function(e,t,n){"use strict";var r=n(78427),o=n(43831),i=n(36500),a=n(99775),u=n(78800).trim,c=n(44966),s=r.parseInt,l=r.Symbol,f=l&&l.iterator,d=/^[+-]?0x/i,p=i(d.exec),h=8!==s(c+"08")||22!==s(c+"0x16")||f&&!o((function(){s(Object(f))}));e.exports=h?function(e,t){var n=u(a(e));return s(n,t>>>0||(p(d,n)?16:10))}:s},69502:function(e,t,n){"use strict";var r=n(35843),o=n(36500),i=n(10878),a=n(43831),u=n(4276),c=n(56593),s=n(55706),l=n(60855),f=n(66122),d=Object.assign,p=Object.defineProperty,h=o([].concat);e.exports=!d||a((function(){if(r&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||u(d({},t)).join("")!=o}))?function(e,t){for(var n=l(e),o=arguments.length,a=1,d=c.f,p=s.f;o>a;)for(var v,m=f(arguments[a++]),g=d?h(u(m),d(m)):u(m),y=g.length,b=0;y>b;)v=g[b++],r&&!i(p,m,v)||(n[v]=m[v]);return n}:d},79751:function(e,t,n){"use strict";var r,o=n(66970),i=n(98457),a=n(46458),u=n(39833),c=n(83099),s=n(59289),l=n(58908),f=l("IE_PROTO"),d=function(){},p=function(e){return"