From 6f1607e60c5ff2099f8aa0ba95c4ff407eb8f17a Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Mon, 19 Jun 2023 15:03:51 +0700 Subject: [PATCH 1/6] UBER-477: Uberflow dependencies Signed-off-by: Andrey Sobolev --- .gitattributes | 2 +- common/config/rush/.npmrc-publish | 20 +++++ common/config/rush/artifactory.json | 24 +++++ common/config/rush/build-cache.json | 75 ++++++++++++++-- common/config/rush/experiments.json | 30 ++++++- common/config/rush/rush-plugins.json | 29 ++++++ common/config/rush/version-policies.json | 2 +- models/all/src/version.json | 2 +- .../profiles/assets/config/rush-project.json | 2 +- .../profiles/default/config/rush-project.json | 2 +- .../profiles/ui/config/rush-project.json | 4 +- .../ui/src/components/internal/Root.svelte | 13 ++- packages/ui/src/location.ts | 43 ++++++--- .../src/components/Workbench.svelte | 9 +- plugins/workbench-resources/src/connect.ts | 4 +- plugins/workbench/src/index.ts | 4 + rush.json | 4 +- tools/apm/apm.js | 36 ++++---- tools/apm/package.json | 1 + tools/apm/src/index.ts | 23 ++--- tools/apm/src/sync.ts | 89 +++++++++++-------- 21 files changed, 317 insertions(+), 101 deletions(-) create mode 100644 common/config/rush/.npmrc-publish create mode 100644 common/config/rush/rush-plugins.json diff --git a/.gitattributes b/.gitattributes index 077267a6aa..79a85db5c2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,6 @@ # Don't allow people to merge changes to these generated files, because the result # may be invalid. You need to run "rush update" again. -pnpm-lock.yaml merge=binary +pnpm-lock.yaml merge=text shrinkwrap.yaml merge=binary npm-shrinkwrap.json merge=binary yarn.lock merge=binary diff --git a/common/config/rush/.npmrc-publish b/common/config/rush/.npmrc-publish new file mode 100644 index 0000000000..7ab44c18d6 --- /dev/null +++ b/common/config/rush/.npmrc-publish @@ -0,0 +1,20 @@ +# This config file is very similar to common/config/rush/.npmrc, except that .npmrc-publish +# is used by the "rush publish" command, as publishing often involves different credentials +# and registries than other operations. +# +# Before invoking the package manager, Rush will copy this file to "common/temp/publish-home/.npmrc" +# and then temporarily map that folder as the "home directory" for the current user account. +# This enables the same settings to apply for each project folder that gets published. The copied file +# will omit any config lines that reference environment variables that are undefined in that session; +# this avoids problems that would otherwise result due to a missing variable being replaced by +# an empty string. +# +# * * * SECURITY WARNING * * * +# +# It is NOT recommended to store authentication tokens in a text file on a lab machine, because +# other unrelated processes may be able to read the file. Also, the file may persist indefinitely, +# for example if the machine loses power. A safer practice is to pass the token via an +# environment variable, which can be referenced from .npmrc using ${} expansion. For example: +# +# //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} +# diff --git a/common/config/rush/artifactory.json b/common/config/rush/artifactory.json index 65f7da003a..268065478a 100644 --- a/common/config/rush/artifactory.json +++ b/common/config/rush/artifactory.json @@ -46,6 +46,14 @@ */ "artifactoryWebsiteUrl": "", + /** + * Uncomment this line to specify the type of credential to save in the user's ~/.npmrc file. + * The default is "password", which means the user's API token will be traded in for an + * npm password specific to that registry. Optionally you can specify "authToken", which + * will save the user's API token as credentials instead. + */ + // "credentialType": "password", + /** * These settings allow the "rush setup" interactive prompts to be customized, for * example with messages specific to your team or configuration. Specify an empty string @@ -57,11 +65,13 @@ * "This monorepo consumes packages from an Artifactory private NPM registry." */ // "introduction": "", + /** * Overrides the message that normally says: * "Please contact the repository maintainers for help with setting up an Artifactory user account." */ // "obtainAnAccount": "", + /** * Overrides the message that normally says: * "Please open this URL in your web browser:" @@ -69,17 +79,31 @@ * The "artifactoryWebsiteUrl" string is printed after this message. */ // "visitWebsite": "", + /** * Overrides the message that normally says: * "Your user name appears in the upper-right corner of the JFrog website." */ // "locateUserName": "", + /** * Overrides the message that normally says: * "Click 'Edit Profile' on the JFrog website. Click the 'Generate API Key' * button if you haven't already done so previously." */ // "locateApiKey": "" + + /** + * Overrides the message that normally prompts: + * "What is your Artifactory user name?" + */ + // "userNamePrompt": "" + + /** + * Overrides the message that normally prompts: + * "What is your Artifactory API key?" + */ + // "apiKeyPrompt": "" } } } diff --git a/common/config/rush/build-cache.json b/common/config/rush/build-cache.json index 9fa8bb1a73..4e26cde258 100644 --- a/common/config/rush/build-cache.json +++ b/common/config/rush/build-cache.json @@ -2,7 +2,7 @@ * This configuration file manages Rush's build cache feature. * More documentation is available on the Rush website: https://rushjs.io */ - { +{ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/build-cache.schema.json", /** @@ -21,9 +21,16 @@ /** * Setting this property overrides the cache entry ID. If this property is set, it must contain - * a [hash] token. It may also contain a [projectName] or a [projectName:normalize] token. + * a [hash] token. + * + * Other available tokens: + * - [projectName] + * - [projectName:normalize] + * - [phaseName] + * - [phaseName:normalize] + * - [phaseName:trimPrefix] */ - "cacheEntryNamePattern": "[projectName:normalize]-[hash]", + // "cacheEntryNamePattern": "[projectName:normalize]-[phaseName:normalize]-[hash]" /** * Use this configuration with "cacheProvider"="azure-blob-storage" @@ -62,17 +69,26 @@ */ "amazonS3Configuration": { /** - * (Required) The Amazon S3 region of the bucket to use for build cache (e.g. "us-east-1"). + * (Required unless s3Endpoint is specified) The name of the bucket to use for build cache. + * Example: "my-bucket" */ - // "s3Region": "us-east-1", + // "s3Bucket": "my-bucket", /** - * The name of the bucket in Amazon S3 to use for build cache. + * (Required unless s3Bucket is specified) The Amazon S3 endpoint of the bucket to use for build cache. + * This should not include any path; use the s3Prefix to set the path. + * Examples: "my-bucket.s3.us-east-2.amazonaws.com" or "http://localhost:9000" */ - // (Required) "s3Bucket": "my-bucket", + // "s3Endpoint": "https://my-bucket.s3.us-east-2.amazonaws.com", /** - * An optional prefix ("folder") for cache items. + * (Required) The Amazon S3 region of the bucket to use for build cache. + * Example: "us-east-1" + */ + // "s3Region": "us-east-1", + + /** + * An optional prefix ("folder") for cache items. It should not start with "/". */ // "s3Prefix": "my-prefix", @@ -80,5 +96,48 @@ * If set to true, allow writing to the cache. Defaults to false. */ // "isCacheWriteAllowed": true + }, + + /** + * Use this configuration with "cacheProvider"="http" + */ + "httpConfiguration": { + /** + * (Required) The URL of the server that stores the caches. + * Example: "https://build-cacches.example.com/" + */ + // "url": "https://build-cacches.example.com/", + + /** + * (Optional) The HTTP method to use when writing to the cache (defaults to PUT). + * Should be one of PUT, POST, or PATCH. + * Example: "PUT" + */ + // "uploadMethod": "PUT", + + /** + * (Optional) HTTP headers to pass to the cache server. + * Example: { "X-HTTP-Company-Id": "109283" } + */ + // "headers": {}, + + /** + * (Optional) Shell command that prints the authorization token needed to communicate with the + * cache server, and exits with exit code 0. This command will be executed from the root of + * the monorepo. + * Example: { "exec": "node", "args": ["common/scripts/auth.js"] } + */ + // "tokenHandler": { "exec": "node", "args": ["common/scripts/auth.js"] }, + + /** + * (Optional) Prefix for cache keys. + * Example: "my-company-" + */ + // "cacheKeyPrefix": "", + + /** + * (Optional) If set to true, allow writing to the cache. Defaults to false. + */ + // "isCacheWriteAllowed": true } } diff --git a/common/config/rush/experiments.json b/common/config/rush/experiments.json index c00e34705d..56160d9717 100644 --- a/common/config/rush/experiments.json +++ b/common/config/rush/experiments.json @@ -28,5 +28,33 @@ * If true, the chmod field in temporary project tar headers will not be normalized. * This normalization can help ensure consistent tarball integrity across platforms. */ - // "noChmodFieldInTarHeaderNormalization": true + // "noChmodFieldInTarHeaderNormalization": true, + + /** + * If true, build caching will respect the allowWarningsInSuccessfulBuild flag and cache builds with warnings. + * This will not replay warnings from the cached build. + */ + // "buildCacheWithAllowWarningsInSuccessfulBuild": true, + + /** + * If true, the phased commands feature is enabled. To use this feature, create a "phased" command + * in common/config/rush/command-line.json. + */ + "phasedCommands": true, + + /** + * If true, perform a clean install after when running `rush install` or `rush update` if the + * `.npmrc` file has changed since the last install. + */ + // "cleanInstallAfterNpmrcChanges": true, + + /** + * If true, print the outputs of shell commands defined in event hooks to the console. + */ + // "printEventHooksOutputToConsole": true, + + /** + * If true, Rush will not allow node_modules in the repo folder or in parent folders. + */ + // "forbidPhantomResolvableNodeModulesFolders": true } diff --git a/common/config/rush/rush-plugins.json b/common/config/rush/rush-plugins.json new file mode 100644 index 0000000000..752e373213 --- /dev/null +++ b/common/config/rush/rush-plugins.json @@ -0,0 +1,29 @@ +/** + * This configuration file manages Rush's plugin feature. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugins.schema.json", + "plugins": [ + /** + * Each item configures a plugin to be loaded by Rush. + */ + // { + // /** + // * The name of the NPM package that provides the plugin. + // */ + // "packageName": "@scope/my-rush-plugin", + // /** + // * The name of the plugin. This can be found in the "pluginName" + // * field of the "rush-plugin-manifest.json" file in the NPM package folder. + // */ + // "pluginName": "my-plugin-name", + // /** + // * The name of a Rush autoinstaller that will be used for installation, which + // * can be created using "rush init-autoinstaller". Add the plugin's NPM package + // * to the package.json "dependencies" of your autoinstaller, then run + // * "rush update-autoinstaller". + // */ + // "autoinstallerName": "rush-plugins" + // } + ] +} \ No newline at end of file diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index 048aef0fad..6da276b059 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -40,7 +40,7 @@ // * When creating a release branch in Git, this field should be updated according to the // * type of release. // * - // * Valid values are: "prerelease", "release", "minor", "patch", "major" + // * Valid values are: "prerelease", "minor", "patch", "major" // */ // "nextBump": "prerelease", // diff --git a/models/all/src/version.json b/models/all/src/version.json index 0326a7e8ff..253bbe8b6d 100644 --- a/models/all/src/version.json +++ b/models/all/src/version.json @@ -1 +1 @@ -{ "major": 0, "minor": 6, "patch": 99 } +{ "major": 0, "minor": 6, "patch": 108 } diff --git a/packages/platform-rig/profiles/assets/config/rush-project.json b/packages/platform-rig/profiles/assets/config/rush-project.json index 1bd09c71f6..c982724fb0 100644 --- a/packages/platform-rig/profiles/assets/config/rush-project.json +++ b/packages/platform-rig/profiles/assets/config/rush-project.json @@ -1,5 +1,5 @@ { - "incrementalBuildIgnoredGlobs": ["temp/**"], + "incrementalBuildIgnoredGlobs": ["temp/**", "dist_cache/**", "lib/**"], "disableBuildCacheForProject": false, "operationSettings": [ diff --git a/packages/platform-rig/profiles/default/config/rush-project.json b/packages/platform-rig/profiles/default/config/rush-project.json index 1bd09c71f6..c982724fb0 100644 --- a/packages/platform-rig/profiles/default/config/rush-project.json +++ b/packages/platform-rig/profiles/default/config/rush-project.json @@ -1,5 +1,5 @@ { - "incrementalBuildIgnoredGlobs": ["temp/**"], + "incrementalBuildIgnoredGlobs": ["temp/**", "dist_cache/**", "lib/**"], "disableBuildCacheForProject": false, "operationSettings": [ diff --git a/packages/platform-rig/profiles/ui/config/rush-project.json b/packages/platform-rig/profiles/ui/config/rush-project.json index 5964c5453b..efc668d07c 100644 --- a/packages/platform-rig/profiles/ui/config/rush-project.json +++ b/packages/platform-rig/profiles/ui/config/rush-project.json @@ -1,11 +1,11 @@ { - "incrementalBuildIgnoredGlobs": ["temp/**"], + "incrementalBuildIgnoredGlobs": ["temp/**", "dist_cache/**", "lib/**"], "disableBuildCacheForProject": false, "operationSettings": [ { "operationName": "build", - "outputFolderNames": ["dist_cache"] + "outputFolderNames": ["dist", "lib", "dist_cache"] } ] } \ No newline at end of file diff --git a/packages/ui/src/components/internal/Root.svelte b/packages/ui/src/components/internal/Root.svelte index 464bc1e609..d1337e7e1c 100644 --- a/packages/ui/src/components/internal/Root.svelte +++ b/packages/ui/src/components/internal/Root.svelte @@ -39,9 +39,16 @@ if (last === null) { last = localStorage.getItem('platform_last_loc') } + let useDefault = true if (last !== null) { - navigate(JSON.parse(last)) - } else { + const storedLoc = JSON.parse(last) + const key = storedLoc.path?.[0] + if (Array.from(routes.values()).includes(key) || Array.from(routes.keys()).includes(key)) { + useDefault = false + navigate(storedLoc) + } + } + if (useDefault) { application = getMetadata(uiPlugin.metadata.DefaultApplication) if (application !== undefined) { const loc = getCurrentLocation() @@ -187,6 +194,7 @@ // height: var(--app-height); .antiStatusBar { + -webkit-app-region: drag; min-height: var(--status-bar-height); height: var(--status-bar-height); // min-width: 600px; @@ -214,6 +222,7 @@ user-select: none; } .widget { + -webkit-app-region: no-drag; width: 16px; height: 16px; font-size: 14px; diff --git a/packages/ui/src/location.ts b/packages/ui/src/location.ts index 97385dad09..fdda0db464 100644 --- a/packages/ui/src/location.ts +++ b/packages/ui/src/location.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import { derived, writable } from 'svelte/store' +import { derived, get, writable } from 'svelte/store' import { closePopup } from './popups' import justClone from 'just-clone' import { Location as PlatformLocation } from './types' @@ -100,7 +100,7 @@ function parseHash (hash: string): string { // ------------------------ -export function getCurrentLocation (): PlatformLocation { +export function getRawCurrentLocation (): PlatformLocation { return parseLocation(window.location) } @@ -108,26 +108,47 @@ export function getCurrentResolvedLocation (): PlatformLocation { return justClone(resolvedLocation) } -const locationWritable = writable(getCurrentLocation()) -window.addEventListener('popstate', () => { - locationWritable.set(getCurrentLocation()) -}) +declare global { + interface Window { + embeddedPlatform?: boolean + } +} +const embeddedPlatform = window.embeddedPlatform ?? false +const locationWritable = writable(embeddedPlatform ? { path: [] } : getRawCurrentLocation()) + +console.log('embeddedPlatform', window.embeddedPlatform) + +if (!embeddedPlatform) { + window.addEventListener('popstate', () => { + locationWritable.set(getRawCurrentLocation()) + }) +} -export const location = derived(locationWritable, (loc) => loc) -export const resolvedLocationStore = writable(getCurrentLocation()) -let resolvedLocation = getCurrentLocation() +export const location = embeddedPlatform ? locationWritable : derived(locationWritable, (loc) => loc) +export const resolvedLocationStore = writable(getRawCurrentLocation()) +let resolvedLocation = getRawCurrentLocation() export function setResolvedLocation (location: PlatformLocation): void { resolvedLocation = location resolvedLocationStore.set(justClone(location)) } +export function getCurrentLocation (): PlatformLocation { + if (embeddedPlatform) { + return justClone(get(locationWritable)) + } + return getRawCurrentLocation() +} + export function navigate (location: PlatformLocation, store = true): boolean { closePopup() + const cur = locationToUrl(getCurrentLocation()) const url = locationToUrl(location) - if (locationToUrl(getCurrentLocation()) !== url) { + if (cur !== url) { if (store) { - history.pushState(null, '', url) + if (!embeddedPlatform) { + history.pushState(null, '', url) + } localStorage.setItem('platform_last_loc', JSON.stringify(location)) if (location.path[1] !== undefined) { localStorage.setItem(`platform_last_loc_${location.path[1]}`, JSON.stringify(location)) diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 0468f840c3..6cb899fa34 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -18,9 +18,9 @@ import login from '@hcengineering/login' import notification, { notificationId } from '@hcengineering/notification' import { BrowserNotificatator, NotificationClientImpl } from '@hcengineering/notification-resources' - import { IntlString, getMetadata, getResource } from '@hcengineering/platform' - import setting from '@hcengineering/setting' + import { IntlString, broadcastEvent, getMetadata, getResource } from '@hcengineering/platform' import { ActionContext, createQuery, getClient } from '@hcengineering/presentation' + import setting from '@hcengineering/setting' import { AnyComponent, CompAndProps, @@ -65,15 +65,15 @@ import { workspacesStore } from '../utils' import AccountPopup from './AccountPopup.svelte' import AppItem from './AppItem.svelte' + import AppSwitcher from './AppSwitcher.svelte' import Applications from './Applications.svelte' import Logo from './Logo.svelte' import NavHeader from './NavHeader.svelte' import Navigator from './Navigator.svelte' import SelectWorkspaceMenu from './SelectWorkspaceMenu.svelte' import SpaceView from './SpaceView.svelte' - import TopMenu from './icons/TopMenu.svelte' import IconSettings from './icons/Settings.svelte' - import AppSwitcher from './AppSwitcher.svelte' + import TopMenu from './icons/TopMenu.svelte' let contentPanel: HTMLElement @@ -190,6 +190,7 @@ const title = getMetadata(workbench.metadata.PlatformTitle) ?? 'Platform' document.title = ws == null ? title : `${ws} - ${title}` } + broadcastEvent(workbench.event.NotifyTitle, document.title) } async function getWindowTitle (loc: Location) { if (loc.fragment == null) return diff --git a/plugins/workbench-resources/src/connect.ts b/plugins/workbench-resources/src/connect.ts index 36867ec495..bb4f7cf640 100644 --- a/plugins/workbench-resources/src/connect.ts +++ b/plugins/workbench-resources/src/connect.ts @@ -9,7 +9,7 @@ import core, { versionToString } from '@hcengineering/core' import login, { loginId } from '@hcengineering/login' -import { addEventListener, getMetadata, getResource, setMetadata } from '@hcengineering/platform' +import { addEventListener, broadcastEvent, getMetadata, getResource, setMetadata } from '@hcengineering/platform' import presentation, { closeClient, refreshClient, setClient } from '@hcengineering/presentation' import ui, { fetchMetadataLocalStorage, @@ -20,6 +20,7 @@ import ui, { showPopup } from '@hcengineering/ui' import ServerManager from './components/ServerManager.svelte' +import plugin from './plugin' export let versionError: string | undefined = '' @@ -169,6 +170,7 @@ export async function connect (title: string): Promise { } }) } + await broadcastEvent(plugin.event.NotifyConnection, getCurrentAccount()) return _client } diff --git a/plugins/workbench/src/index.ts b/plugins/workbench/src/index.ts index d17f50afbf..b942dd0001 100644 --- a/plugins/workbench/src/index.ts +++ b/plugins/workbench/src/index.ts @@ -130,6 +130,10 @@ export default plugin(workbenchId, { icon: { Search: '' as Asset }, + event: { + NotifyConnection: '' as Metadata, + NotifyTitle: '' as Metadata + }, metadata: { PlatformTitle: '' as Metadata, ExcludedApplications: '' as Metadata[]>, diff --git a/rush.json b/rush.json index 47d050d25f..e845c4a550 100644 --- a/rush.json +++ b/rush.json @@ -16,7 +16,7 @@ * path segment in the "$schema" field for all your Rush config files. This will ensure * correct error-underlining and tab-completion for editors such as VS Code. */ - "rushVersion": "5.97.1", + "rushVersion": "5.100.1", /** * The next field selects which package manager should be installed and determines its version. @@ -26,7 +26,7 @@ * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation * for details about these alternatives. */ - "pnpmVersion": "6.35.1", + "pnpmVersion": "6.7.1", // "npmVersion": "4.5.0", // "yarnVersion": "1.9.4", diff --git a/tools/apm/apm.js b/tools/apm/apm.js index e42c75907a..a255133758 100644 --- a/tools/apm/apm.js +++ b/tools/apm/apm.js @@ -1,27 +1,27 @@ -"use strict";var Nr=Object.create;var Fe=Object.defineProperty,_r=Object.defineProperties,Ir=Object.getOwnPropertyDescriptor,Pr=Object.getOwnPropertyDescriptors,Or=Object.getOwnPropertyNames,pt=Object.getOwnPropertySymbols,Mr=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable;var ft=(u,e,r)=>e in u?Fe(u,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[e]=r,dt=(u,e)=>{for(var r in e||={})mt.call(e,r)&&ft(u,r,e[r]);if(pt)for(var r of pt(e))Lr.call(e,r)&&ft(u,r,e[r]);return u},xt=(u,e)=>_r(u,Pr(e));var _=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports);var Rr=(u,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let h of Or(e))!mt.call(u,h)&&h!==r&&Fe(u,h,{get:()=>e[h],enumerable:!(s=Ir(e,h))||s.enumerable});return u};var Dt=(u,e,r)=>(r=u!=null?Nr(Mr(u)):{},Rr(e||!u||!u.__esModule?Fe(r,"default",{value:u,enumerable:!0}):r,u));var ee=_(be=>{var fe=class extends Error{constructor(e,r,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},we=class extends fe{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};be.CommanderError=fe;be.InvalidArgumentError=we});var me=_(Be=>{var{InvalidArgumentError:Xr}=ee(),ke=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e,this.parseArg=(r,s)=>{if(!e.includes(r))throw new Xr(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(r,s):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Jr(u){let e=u.name()+(u.variadic===!0?"...":"");return u.required?"<"+e+">":"["+e+"]"}Be.Argument=ke;Be.humanReadableArgName=Jr});var Ne=_(Et=>{var{humanReadableArgName:Ur}=me(),Te=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){let r=e.commands.filter(s=>!s._hidden);if(e._hasImplicitHelpCommand()){let[,s,h]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),l=e.createCommand(s).helpOption(!1);l.description(e._helpCommandDescription),h&&l.arguments(h),r.push(l)}return this.sortSubcommands&&r.sort((s,h)=>s.name().localeCompare(h.name())),r}visibleOptions(e){let r=e.options.filter(l=>!l.hidden),s=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),h=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(s||h){let l;s?h?l=e.createOption(e._helpFlags,e._helpDescription):l=e.createOption(e._helpShortFlag,e._helpDescription):l=e.createOption(e._helpLongFlag,e._helpDescription),r.push(l)}if(this.sortOptions){let l=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");r.sort((o,D)=>l(o).localeCompare(l(D)))}return r}visibleArguments(e){return e._argsDescription&&e._args.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e._args.find(r=>r.description)?e._args:[]}subcommandTerm(e){let r=e._args.map(s=>Ur(s)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((s,h)=>Math.max(s,r.subcommandTerm(h).length),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((s,h)=>Math.max(s,r.optionTerm(h).length),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((s,h)=>Math.max(s,r.argumentTerm(h).length),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let s="";for(let h=e.parent;h;h=h.parent)s=h.name()+" "+s;return s+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.description()}optionDescription(e){let r=[];return e.argChoices&&!e.negate&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&!e.negate&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let s=`(${r.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatHelp(e,r){let s=r.padWidth(e,r),h=r.helpWidth||80,l=2,o=2;function D(i,n){if(n){let a=`${i.padEnd(s+o)}${n}`;return r.wrap(a,h-l,s+o)}return i}function m(i){return i.join(` -`).replace(/^/gm," ".repeat(l))}let f=[`Usage: ${r.commandUsage(e)}`,""],p=r.commandDescription(e);p.length>0&&(f=f.concat([p,""]));let d=r.visibleArguments(e).map(i=>D(r.argumentTerm(i),r.argumentDescription(i)));d.length>0&&(f=f.concat(["Arguments:",m(d),""]));let c=r.visibleOptions(e).map(i=>D(r.optionTerm(i),r.optionDescription(i)));c.length>0&&(f=f.concat(["Options:",m(c),""]));let t=r.visibleCommands(e).map(i=>D(r.subcommandTerm(i),r.subcommandDescription(i)));return t.length>0&&(f=f.concat(["Commands:",m(t),""])),f.join(` -`)}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}wrap(e,r,s,h=40){if(e.match(/[\n]\s+/))return e;let l=r-s;if(l(d.slice(-1)===` +"use strict";var Ns=Object.create;var Fe=Object.defineProperty,_s=Object.defineProperties,Is=Object.getOwnPropertyDescriptor,Ps=Object.getOwnPropertyDescriptors,Os=Object.getOwnPropertyNames,ft=Object.getOwnPropertySymbols,Ms=Object.getPrototypeOf,dt=Object.prototype.hasOwnProperty,Ls=Object.prototype.propertyIsEnumerable;var mt=(h,e,s)=>e in h?Fe(h,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):h[e]=s,xt=(h,e)=>{for(var s in e||={})dt.call(e,s)&&mt(h,s,e[s]);if(ft)for(var s of ft(e))Ls.call(e,s)&&mt(h,s,e[s]);return h},Dt=(h,e)=>_s(h,Ps(e));var _=(h,e)=>()=>(e||h((e={exports:{}}).exports,e),e.exports);var Xs=(h,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of Os(e))!dt.call(h,u)&&u!==s&&Fe(h,u,{get:()=>e[u],enumerable:!(r=Is(e,u))||r.enumerable});return h};var we=(h,e,s)=>(s=h!=null?Ns(Ms(h)):{},Xs(e||!h||!h.__esModule?Fe(s,"default",{value:h,enumerable:!0}):s,h));var te=_(ke=>{var pe=class extends Error{constructor(e,s,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=s,this.exitCode=e,this.nestedError=void 0}},be=class extends pe{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};ke.CommanderError=pe;ke.InvalidArgumentError=be});var fe=_(Te=>{var{InvalidArgumentError:Rs}=te(),Be=class{constructor(e,s){switch(this.description=s||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,s){return s===this.defaultValue||!Array.isArray(s)?[e]:s.concat(e)}default(e,s){return this.defaultValue=e,this.defaultValueDescription=s,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e,this.parseArg=(s,r)=>{if(!e.includes(s))throw new Rs(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(s,r):s},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Js(h){let e=h.name()+(h.variadic===!0?"...":"");return h.required?"<"+e+">":"["+e+"]"}Te.Argument=Be;Te.humanReadableArgName=Js});var _e=_(Et=>{var{humanReadableArgName:Us}=fe(),Ne=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){let s=e.commands.filter(r=>!r._hidden);if(e._hasImplicitHelpCommand()){let[,r,u]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),l=e.createCommand(r).helpOption(!1);l.description(e._helpCommandDescription),u&&l.arguments(u),s.push(l)}return this.sortSubcommands&&s.sort((r,u)=>r.name().localeCompare(u.name())),s}visibleOptions(e){let s=e.options.filter(l=>!l.hidden),r=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),u=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(r||u){let l;r?u?l=e.createOption(e._helpFlags,e._helpDescription):l=e.createOption(e._helpShortFlag,e._helpDescription):l=e.createOption(e._helpLongFlag,e._helpDescription),s.push(l)}if(this.sortOptions){let l=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");s.sort((o,D)=>l(o).localeCompare(l(D)))}return s}visibleArguments(e){return e._argsDescription&&e._args.forEach(s=>{s.description=s.description||e._argsDescription[s.name()]||""}),e._args.find(s=>s.description)?e._args:[]}subcommandTerm(e){let s=e._args.map(r=>Us(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(s?" "+s:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,s){return s.visibleCommands(e).reduce((r,u)=>Math.max(r,s.subcommandTerm(u).length),0)}longestOptionTermLength(e,s){return s.visibleOptions(e).reduce((r,u)=>Math.max(r,s.optionTerm(u).length),0)}longestArgumentTermLength(e,s){return s.visibleArguments(e).reduce((r,u)=>Math.max(r,s.argumentTerm(u).length),0)}commandUsage(e){let s=e._name;e._aliases[0]&&(s=s+"|"+e._aliases[0]);let r="";for(let u=e.parent;u;u=u.parent)r=u.name()+" "+r;return r+s+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.description()}optionDescription(e){let s=[];return e.argChoices&&!e.negate&&s.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&!e.negate&&s.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.envVar!==void 0&&s.push(`env: ${e.envVar}`),s.length>0?`${e.description} (${s.join(", ")})`:e.description}argumentDescription(e){let s=[];if(e.argChoices&&s.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&s.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),s.length>0){let r=`(${s.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,s){let r=s.padWidth(e,s),u=s.helpWidth||80,l=2,o=2;function D(i,n){if(n){let a=`${i.padEnd(r+o)}${n}`;return s.wrap(a,u-l,r+o)}return i}function m(i){return i.join(` +`).replace(/^/gm," ".repeat(l))}let f=[`Usage: ${s.commandUsage(e)}`,""],p=s.commandDescription(e);p.length>0&&(f=f.concat([p,""]));let d=s.visibleArguments(e).map(i=>D(s.argumentTerm(i),s.argumentDescription(i)));d.length>0&&(f=f.concat(["Arguments:",m(d),""]));let c=s.visibleOptions(e).map(i=>D(s.optionTerm(i),s.optionDescription(i)));c.length>0&&(f=f.concat(["Options:",m(c),""]));let t=s.visibleCommands(e).map(i=>D(s.subcommandTerm(i),s.subcommandDescription(i)));return t.length>0&&(f=f.concat(["Commands:",m(t),""])),f.join(` +`)}padWidth(e,s){return Math.max(s.longestOptionTermLength(e,s),s.longestSubcommandTermLength(e,s),s.longestArgumentTermLength(e,s))}wrap(e,s,r,u=40){if(e.match(/[\n]\s+/))return e;let l=s-r;if(l(d.slice(-1)===` `&&(d=d.slice(0,d.length-1)),(c>0?m:"")+d.trimRight())).join(` -`)}};Et.Help=Te});var Pe=_(Ie=>{var{InvalidArgumentError:zr}=ee(),_e=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let s=gt(e);this.short=s.shortFlag,this.long=s.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e,this.parseArg=(r,s)=>{if(!e.includes(r))throw new zr(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(r,s):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Hr(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}};function Hr(u){return u.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function gt(u){let e,r,s=u.split(/[ |,]+/);return s.length>1&&!/^[[<]/.test(s[1])&&(e=s.shift()),r=s.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}Ie.Option=_e;Ie.splitOptionFlags=gt});var Ct=_(vt=>{function jr(u,e){if(Math.abs(u.length-e.length)>3)return Math.max(u.length,e.length);let r=[];for(let s=0;s<=u.length;s++)r[s]=[s];for(let s=0;s<=e.length;s++)r[0][s]=s;for(let s=1;s<=e.length;s++)for(let h=1;h<=u.length;h++){let l=1;u[h-1]===e[s-1]?l=0:l=1,r[h][s]=Math.min(r[h-1][s]+1,r[h][s-1]+1,r[h-1][s-1]+l),h>1&&s>1&&u[h-1]===e[s-2]&&u[h-2]===e[s-1]&&(r[h][s]=Math.min(r[h][s],r[h-2][s-2]+1))}return r[u.length][e.length]}function Vr(u,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=u.startsWith("--");r&&(u=u.slice(2),e=e.map(o=>o.slice(2)));let s=[],h=3,l=.4;return e.forEach(o=>{if(o.length<=1)return;let D=jr(u,o),m=Math.max(u.length,o.length);(m-D)/m>l&&(Do.localeCompare(D)),r&&(s=s.map(o=>`--${o}`)),s.length>1?` -(Did you mean one of ${s.join(", ")}?)`:s.length===1?` -(Did you mean ${s[0]}?)`:""}vt.suggestSimilar=Vr});var wt=_(Ft=>{var Kr=require("events").EventEmitter,Oe=require("child_process"),$=require("path"),Me=require("fs"),{Argument:$r,humanReadableArgName:Gr}=me(),{CommanderError:Le}=ee(),{Help:Wr}=Ne(),{Option:qr,splitOptionFlags:Yr}=Pe(),{suggestSimilar:At}=Ct(),te=class extends Kr{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!1,this._outputConfiguration={writeOut:r=>process.stdout.write(r),writeErr:r=>process.stderr.write(r),getOutHelpWidth:()=>process.stdout.isTTY?process.stdout.columns:void 0,getErrHelpWidth:()=>process.stderr.isTTY?process.stderr.columns:void 0,outputError:(r,s)=>s(r)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,r,s){let h=r,l=s;typeof h=="object"&&h!==null&&(l=h,h=null),l=l||{};let[,o,D]=e.match(/([^ ]+) *(.*)/),m=this.createCommand(o);return h&&(m.description(h),m._executableHandler=!0),l.isDefault&&(this._defaultCommandName=m._name),m._hidden=!!(l.noHelp||l.hidden),m._executableFile=l.executableFile||null,D&&m.arguments(D),this.commands.push(m),m.parent=this,m.copyInheritedSettings(this),h?this:m}createCommand(e){return new te(e)}createHelp(){return Object.assign(new Wr,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function s(h){h.forEach(l=>{if(l._executableHandler&&!l._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${l.name()}`);s(l.commands)})}return s(e.commands),r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,r){return new $r(e,r)}argument(e,r,s,h){let l=this.createArgument(e,r);return typeof s=="function"?l.default(h).argParser(s):l.default(s),this.addArgument(l),this}arguments(e){return e.split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this._args.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,r){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=r||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,r){let s=["preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'. -Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,s){this._exitCallback&&this._exitCallback(new Le(e,r,s)),process.exit(e)}action(e){let r=s=>{let h=this._args.length,l=s.slice(0,h);return this._storeOptionsAsProperties?l[h]=this:l[h]=this.opts(),l.push(this),e.apply(this,l)};return this._actionHandler=r,this}createOption(e,r){return new qr(e,r)}addOption(e){let r=e.name(),s=e.attributeName(),h=e.defaultValue;if(e.negate||e.optional||e.required||typeof h=="boolean"){if(e.negate){let o=e.long.replace(/^--no-/,"--");h=this._findOption(o)?this.getOptionValue(s):!0}h!==void 0&&this.setOptionValueWithSource(s,h,"default")}this.options.push(e);let l=(o,D,m)=>{let f=this.getOptionValue(s);if(o!==null&&e.parseArg)try{o=e.parseArg(o,f===void 0?h:f)}catch(p){if(p.code==="commander.invalidArgument"){let d=`${D} ${p.message}`;this._displayError(p.exitCode,p.code,d)}throw p}else o!==null&&e.variadic&&(o=e._concatValue(o,f));typeof f=="boolean"||typeof f>"u"?o==null?this.setOptionValueWithSource(s,e.negate?!1:h||!0,m):this.setOptionValueWithSource(s,o,m):o!==null&&this.setOptionValueWithSource(s,e.negate?!1:o,m)};return this.on("option:"+r,o=>{let D=`error: option '${e.flags}' argument '${o}' is invalid.`;l(o,D,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let D=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;l(o,D,"env")}),this}_optionEx(e,r,s,h,l){let o=this.createOption(r,s);if(o.makeOptionMandatory(!!e.mandatory),typeof h=="function")o.default(l).argParser(h);else if(h instanceof RegExp){let D=h;h=(m,f)=>{let p=D.exec(m);return p?p[0]:f},o.default(l).argParser(h)}else o.default(h);return this.addOption(o)}option(e,r,s,h){return this._optionEx({},e,r,s,h)}requiredOption(e,r,s,h){return this._optionEx({mandatory:!0},e,r,s,h)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this}setOptionValueWithSource(e,r,s){return this.setOptionValue(e,r),this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");r=r||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(r.from="electron")),this.rawArgs=e.slice();let s;switch(r.from){case void 0:case"node":this._scriptPath=e[1],s=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case"user":s=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._scriptPath&&require.main&&(this._scriptPath=require.main.filename),this._name=this._name||this._scriptPath&&$.basename(this._scriptPath,$.extname(this._scriptPath)),s}parse(e,r){let s=this._prepareUserArgs(e,r);return this._parseCommand([],s),this}async parseAsync(e,r){let s=this._prepareUserArgs(e,r);return await this._parseCommand([],s),this}_executeSubCommand(e,r){r=r.slice();let s=!1,h=[".js",".ts",".tsx",".mjs",".cjs"];this._checkForMissingMandatoryOptions();let l=this._scriptPath;!l&&require.main&&(l=require.main.filename);let o;try{let c=Me.realpathSync(l);o=$.dirname(c)}catch{o="."}let D=$.basename(l,$.extname(l))+"-"+e._name;e._executableFile&&(D=e._executableFile);let m=$.join(o,D);Me.existsSync(m)?D=m:h.forEach(c=>{Me.existsSync(`${m}${c}`)&&(D=`${m}${c}`)}),s=h.includes($.extname(D));let f;process.platform!=="win32"?s?(r.unshift(D),r=St(process.execArgv).concat(r),f=Oe.spawn(process.argv[0],r,{stdio:"inherit"})):f=Oe.spawn(D,r,{stdio:"inherit"}):(r.unshift(D),r=St(process.execArgv).concat(r),f=Oe.spawn(process.execPath,r,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{process.on(c,()=>{f.killed===!1&&f.exitCode===null&&f.kill(c)})});let d=this._exitCallback;d?f.on("close",()=>{d(new Le(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):f.on("close",process.exit.bind(process)),f.on("error",c=>{if(c.code==="ENOENT"){let t=`'${D}' does not exist +`)}};Et.Help=Ne});var Oe=_(Pe=>{var{InvalidArgumentError:zs}=te(),Ie=class{constructor(e,s){this.flags=e,this.description=s||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=gt(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0}default(e,s){return this.defaultValue=e,this.defaultValueDescription=s,this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,s){return s===this.defaultValue||!Array.isArray(s)?[e]:s.concat(e)}choices(e){return this.argChoices=e,this.parseArg=(s,r)=>{if(!e.includes(s))throw new zs(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(s,r):s},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Hs(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}};function Hs(h){return h.split("-").reduce((e,s)=>e+s[0].toUpperCase()+s.slice(1))}function gt(h){let e,s,r=h.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(e=r.shift()),s=r.shift(),!e&&/^-[^-]$/.test(s)&&(e=s,s=void 0),{shortFlag:e,longFlag:s}}Pe.Option=Ie;Pe.splitOptionFlags=gt});var Ct=_(vt=>{function js(h,e){if(Math.abs(h.length-e.length)>3)return Math.max(h.length,e.length);let s=[];for(let r=0;r<=h.length;r++)s[r]=[r];for(let r=0;r<=e.length;r++)s[0][r]=r;for(let r=1;r<=e.length;r++)for(let u=1;u<=h.length;u++){let l=1;h[u-1]===e[r-1]?l=0:l=1,s[u][r]=Math.min(s[u-1][r]+1,s[u][r-1]+1,s[u-1][r-1]+l),u>1&&r>1&&h[u-1]===e[r-2]&&h[u-2]===e[r-1]&&(s[u][r]=Math.min(s[u][r],s[u-2][r-2]+1))}return s[h.length][e.length]}function Vs(h,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let s=h.startsWith("--");s&&(h=h.slice(2),e=e.map(o=>o.slice(2)));let r=[],u=3,l=.4;return e.forEach(o=>{if(o.length<=1)return;let D=js(h,o),m=Math.max(h.length,o.length);(m-D)/m>l&&(Do.localeCompare(D)),s&&(r=r.map(o=>`--${o}`)),r.length>1?` +(Did you mean one of ${r.join(", ")}?)`:r.length===1?` +(Did you mean ${r[0]}?)`:""}vt.suggestSimilar=Vs});var wt=_(Ft=>{var Ks=require("events").EventEmitter,Me=require("child_process"),G=require("path"),Le=require("fs"),{Argument:$s,humanReadableArgName:Gs}=fe(),{CommanderError:Xe}=te(),{Help:Ws}=_e(),{Option:qs,splitOptionFlags:Ys}=Oe(),{suggestSimilar:At}=Ct(),ie=class extends Ks{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!1,this._outputConfiguration={writeOut:s=>process.stdout.write(s),writeErr:s=>process.stderr.write(s),getOutHelpWidth:()=>process.stdout.isTTY?process.stdout.columns:void 0,getErrHelpWidth:()=>process.stderr.isTTY?process.stderr.columns:void 0,outputError:(s,r)=>r(s)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,s,r){let u=s,l=r;typeof u=="object"&&u!==null&&(l=u,u=null),l=l||{};let[,o,D]=e.match(/([^ ]+) *(.*)/),m=this.createCommand(o);return u&&(m.description(u),m._executableHandler=!0),l.isDefault&&(this._defaultCommandName=m._name),m._hidden=!!(l.noHelp||l.hidden),m._executableFile=l.executableFile||null,D&&m.arguments(D),this.commands.push(m),m.parent=this,m.copyInheritedSettings(this),u?this:m}createCommand(e){return new ie(e)}createHelp(){return Object.assign(new Ws,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,s){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function r(u){u.forEach(l=>{if(l._executableHandler&&!l._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${l.name()}`);r(l.commands)})}return r(e.commands),s=s||{},s.isDefault&&(this._defaultCommandName=e._name),(s.noHelp||s.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,s){return new $s(e,s)}argument(e,s,r,u){let l=this.createArgument(e,s);return typeof r=="function"?l.default(u).argParser(r):l.default(r),this.addArgument(l),this}arguments(e){return e.split(/ +/).forEach(s=>{this.argument(s)}),this}addArgument(e){let s=this._args.slice(-1)[0];if(s&&s.variadic)throw new Error(`only the last argument can be variadic '${s.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,s){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=s||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,s){let r=["preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'. +Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(s):this._lifeCycleHooks[e]=[s],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=s=>{if(s.code!=="commander.executeSubCommandAsync")throw s},this}_exit(e,s,r){this._exitCallback&&this._exitCallback(new Xe(e,s,r)),process.exit(e)}action(e){let s=r=>{let u=this._args.length,l=r.slice(0,u);return this._storeOptionsAsProperties?l[u]=this:l[u]=this.opts(),l.push(this),e.apply(this,l)};return this._actionHandler=s,this}createOption(e,s){return new qs(e,s)}addOption(e){let s=e.name(),r=e.attributeName(),u=e.defaultValue;if(e.negate||e.optional||e.required||typeof u=="boolean"){if(e.negate){let o=e.long.replace(/^--no-/,"--");u=this._findOption(o)?this.getOptionValue(r):!0}u!==void 0&&this.setOptionValueWithSource(r,u,"default")}this.options.push(e);let l=(o,D,m)=>{let f=this.getOptionValue(r);if(o!==null&&e.parseArg)try{o=e.parseArg(o,f===void 0?u:f)}catch(p){if(p.code==="commander.invalidArgument"){let d=`${D} ${p.message}`;this._displayError(p.exitCode,p.code,d)}throw p}else o!==null&&e.variadic&&(o=e._concatValue(o,f));typeof f=="boolean"||typeof f>"u"?o==null?this.setOptionValueWithSource(r,e.negate?!1:u||!0,m):this.setOptionValueWithSource(r,o,m):o!==null&&this.setOptionValueWithSource(r,e.negate?!1:o,m)};return this.on("option:"+s,o=>{let D=`error: option '${e.flags}' argument '${o}' is invalid.`;l(o,D,"cli")}),e.envVar&&this.on("optionEnv:"+s,o=>{let D=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;l(o,D,"env")}),this}_optionEx(e,s,r,u,l){let o=this.createOption(s,r);if(o.makeOptionMandatory(!!e.mandatory),typeof u=="function")o.default(l).argParser(u);else if(u instanceof RegExp){let D=u;u=(m,f)=>{let p=D.exec(m);return p?p[0]:f},o.default(l).argParser(u)}else o.default(u);return this.addOption(o)}option(e,s,r,u){return this._optionEx({},e,s,r,u)}requiredOption(e,s,r,u){return this._optionEx({mandatory:!0},e,s,r,u)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,s){return this._storeOptionsAsProperties?this[e]=s:this._optionValues[e]=s,this}setOptionValueWithSource(e,s,r){return this.setOptionValue(e,s),this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,s){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");s=s||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(s.from="electron")),this.rawArgs=e.slice();let r;switch(s.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${s.from}' }`)}return!this._scriptPath&&require.main&&(this._scriptPath=require.main.filename),this._name=this._name||this._scriptPath&&G.basename(this._scriptPath,G.extname(this._scriptPath)),r}parse(e,s){let r=this._prepareUserArgs(e,s);return this._parseCommand([],r),this}async parseAsync(e,s){let r=this._prepareUserArgs(e,s);return await this._parseCommand([],r),this}_executeSubCommand(e,s){s=s.slice();let r=!1,u=[".js",".ts",".tsx",".mjs",".cjs"];this._checkForMissingMandatoryOptions();let l=this._scriptPath;!l&&require.main&&(l=require.main.filename);let o;try{let c=Le.realpathSync(l);o=G.dirname(c)}catch{o="."}let D=G.basename(l,G.extname(l))+"-"+e._name;e._executableFile&&(D=e._executableFile);let m=G.join(o,D);Le.existsSync(m)?D=m:u.forEach(c=>{Le.existsSync(`${m}${c}`)&&(D=`${m}${c}`)}),r=u.includes(G.extname(D));let f;process.platform!=="win32"?r?(s.unshift(D),s=St(process.execArgv).concat(s),f=Me.spawn(process.argv[0],s,{stdio:"inherit"})):f=Me.spawn(D,s,{stdio:"inherit"}):(s.unshift(D),s=St(process.execArgv).concat(s),f=Me.spawn(process.execPath,s,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{process.on(c,()=>{f.killed===!1&&f.exitCode===null&&f.kill(c)})});let d=this._exitCallback;d?f.on("close",()=>{d(new Xe(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):f.on("close",process.exit.bind(process)),f.on("error",c=>{if(c.code==="ENOENT"){let t=`'${D}' does not exist - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead - - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(t)}else if(c.code==="EACCES")throw new Error(`'${D}' not executable`);if(!d)process.exit(1);else{let t=new Le(1,"commander.executeSubCommandAsync","(error)");t.nestedError=c,d(t)}}),this.runningCommand=f}_dispatchSubcommand(e,r,s){let h=this._findCommand(e);if(h||this.help({error:!0}),h._executableHandler)this._executeSubCommand(h,r.concat(s));else return h._parseCommand(r,s)}_checkNumberOfArguments(){this._args.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(s,h,l)=>{let o=h;if(h!==null&&s.parseArg)try{o=s.parseArg(h,l)}catch(D){if(D.code==="commander.invalidArgument"){let m=`error: command-argument value '${h}' is invalid for argument '${s.name()}'. ${D.message}`;this._displayError(D.exitCode,D.code,m)}throw D}return o};this._checkNumberOfArguments();let r=[];this._args.forEach((s,h)=>{let l=s.defaultValue;s.variadic?he(s,D,o),s.defaultValue))):l===void 0&&(l=[]):hr()):r()}_chainOrCallHooks(e,r){let s=e,h=[];return Re(this).reverse().filter(l=>l._lifeCycleHooks[r]!==void 0).forEach(l=>{l._lifeCycleHooks[r].forEach(o=>{h.push({hookedCommand:l,callback:o})})}),r==="postAction"&&h.reverse(),h.forEach(l=>{s=this._chainOrCall(s,()=>l.callback(l.hookedCommand,this))}),s}_parseCommand(e,r){let s=this.parseOptions(r);if(this._parseOptionsEnv(),e=e.concat(s.operands),r=s.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return yt(this,r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),yt(this,s.unknown),this._checkForMissingMandatoryOptions();let h=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0])},l=`command:${this.name()}`;if(this._actionHandler){h(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&this.parent.emit(l,e,r),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(l))h(),this._processArguments(),this.parent.emit(l,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(h(),this._processArguments())}else this.commands.length?(h(),this.help({error:!0})):(h(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})}parseOptions(e){let r=[],s=[],h=r,l=e.slice();function o(m){return m.length>1&&m[0]==="-"}let D=null;for(;l.length;){let m=l.shift();if(m==="--"){h===s&&h.push(m),h.push(...l);break}if(D&&!o(m)){this.emit(`option:${D.name()}`,m);continue}if(D=null,o(m)){let f=this._findOption(m);if(f){if(f.required){let p=l.shift();p===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,p)}else if(f.optional){let p=null;l.length>0&&!o(l[0])&&(p=l.shift()),this.emit(`option:${f.name()}`,p)}else this.emit(`option:${f.name()}`);D=f.variadic?f:null;continue}}if(m.length>2&&m[0]==="-"&&m[1]!=="-"){let f=this._findOption(`-${m[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,m.slice(2)):(this.emit(`option:${f.name()}`),l.unshift(`-${m.slice(2)}`));continue}}if(/^--[^=]+=/.test(m)){let f=m.indexOf("="),p=this._findOption(m.slice(0,f));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,m.slice(f+1));continue}}if(o(m)&&(h=s),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&s.length===0){if(this._findCommand(m)){r.push(m),l.length>0&&s.push(...l);break}else if(m===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(m),l.length>0&&r.push(...l);break}else if(this._defaultCommandName){s.push(m),l.length>0&&s.push(...l);break}}if(this._passThroughOptions){h.push(m),l.length>0&&h.push(...l);break}h.push(m)}return{operands:r,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let s=0;s{e.required&&this.args[s]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,u,l)=>{let o=u;if(u!==null&&r.parseArg)try{o=r.parseArg(u,l)}catch(D){if(D.code==="commander.invalidArgument"){let m=`error: command-argument value '${u}' is invalid for argument '${r.name()}'. ${D.message}`;this._displayError(D.exitCode,D.code,m)}throw D}return o};this._checkNumberOfArguments();let s=[];this._args.forEach((r,u)=>{let l=r.defaultValue;r.variadic?ue(r,D,o),r.defaultValue))):l===void 0&&(l=[]):us()):s()}_chainOrCallHooks(e,s){let r=e,u=[];return Re(this).reverse().filter(l=>l._lifeCycleHooks[s]!==void 0).forEach(l=>{l._lifeCycleHooks[s].forEach(o=>{u.push({hookedCommand:l,callback:o})})}),s==="postAction"&&u.reverse(),u.forEach(l=>{r=this._chainOrCall(r,()=>l.callback(l.hookedCommand,this))}),r}_parseCommand(e,s){let r=this.parseOptions(s);if(this._parseOptionsEnv(),e=e.concat(r.operands),s=r.unknown,this.args=e.concat(s),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),s);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return yt(this,s),this._dispatchSubcommand(this._defaultCommandName,e,s);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),yt(this,r.unknown),this._checkForMissingMandatoryOptions();let u=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},l=`command:${this.name()}`;if(this._actionHandler){u(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&this.parent.emit(l,e,s),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(l))u(),this._processArguments(),this.parent.emit(l,e,s);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,s);this.listenerCount("command:*")?this.emit("command:*",e,s):this.commands.length?this.unknownCommand():(u(),this._processArguments())}else this.commands.length?(u(),this.help({error:!0})):(u(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(s=>s._name===e||s._aliases.includes(e))}_findOption(e){return this.options.find(s=>s.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(s=>{s.mandatory&&e.getOptionValue(s.attributeName())===void 0&&e.missingMandatoryOptionValue(s)})}parseOptions(e){let s=[],r=[],u=s,l=e.slice();function o(m){return m.length>1&&m[0]==="-"}let D=null;for(;l.length;){let m=l.shift();if(m==="--"){u===r&&u.push(m),u.push(...l);break}if(D&&!o(m)){this.emit(`option:${D.name()}`,m);continue}if(D=null,o(m)){let f=this._findOption(m);if(f){if(f.required){let p=l.shift();p===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,p)}else if(f.optional){let p=null;l.length>0&&!o(l[0])&&(p=l.shift()),this.emit(`option:${f.name()}`,p)}else this.emit(`option:${f.name()}`);D=f.variadic?f:null;continue}}if(m.length>2&&m[0]==="-"&&m[1]!=="-"){let f=this._findOption(`-${m[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,m.slice(2)):(this.emit(`option:${f.name()}`),l.unshift(`-${m.slice(2)}`));continue}}if(/^--[^=]+=/.test(m)){let f=m.indexOf("="),p=this._findOption(m.slice(0,f));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,m.slice(f+1));continue}}if(o(m)&&(u=r),(this._enablePositionalOptions||this._passThroughOptions)&&s.length===0&&r.length===0){if(this._findCommand(m)){s.push(m),l.length>0&&r.push(...l);break}else if(m===this._helpCommandName&&this._hasImplicitHelpCommand()){s.push(m),l.length>0&&s.push(...l);break}else if(this._defaultCommandName){r.push(m),l.length>0&&r.push(...l);break}}if(this._passThroughOptions){u.push(m),l.length>0&&u.push(...l);break}u.push(m)}return{operands:s,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},s=this.options.length;for(let r=0;r{if(e.envVar&&e.envVar in process.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,process.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}missingArgument(e){let r=`error: missing required argument '${e}'`;this._displayError(1,"commander.missingArgument",r)}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this._displayError(1,"commander.optionMissingArgument",r)}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this._displayError(1,"commander.missingMandatoryOptionValue",r)}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let h=[],l=this;do{let o=l.createHelp().visibleOptions(l).filter(D=>D.long).map(D=>D.long);h=h.concat(o),l=l.parent}while(l&&!l._enablePositionalOptions);r=At(e,h)}let s=`error: unknown option '${e}'${r}`;this._displayError(1,"commander.unknownOption",s)}_excessArguments(e){if(this._allowExcessArguments)return;let r=this._args.length,s=r===1?"":"s",l=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${s} but got ${e.length}.`;this._displayError(1,"commander.excessArguments",l)}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let h=[];this.createHelp().visibleCommands(this).forEach(l=>{h.push(l.name()),l.alias()&&h.push(l.alias())}),r=At(e,h)}let s=`error: unknown command '${e}'${r}`;this._displayError(1,"commander.unknownCommand",s)}version(e,r,s){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",s=s||"output the version number";let h=this.createOption(r,s);return this._versionOptionName=h.attributeName(),this.options.push(h),this.on("option:"+h.name(),()=>{this._outputConfiguration.writeOut(`${e} -`),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this._args.map(s=>Gr(s));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},s;return r.error?s=h=>this._outputConfiguration.writeErr(h):s=h=>this._outputConfiguration.writeOut(h),r.write=e.write||s,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let s=this._getHelpContext(e);Re(this).reverse().forEach(l=>l.emit("beforeAllHelp",s)),this.emit("beforeHelp",s);let h=this.helpInformation(s);if(r&&(h=r(h),typeof h!="string"&&!Buffer.isBuffer(h)))throw new Error("outputHelp callback must return a string or a Buffer");s.write(h),this.emit(this._helpLongFlag),this.emit("afterHelp",s),Re(this).forEach(l=>l.emit("afterAllHelp",s))}helpOption(e,r){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=r||this._helpDescription;let s=Yr(this._helpFlags);return this._helpShortFlag=s.shortFlag,this._helpLongFlag=s.longFlag,this}help(e){this.outputHelp(e);let r=process.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let s=["beforeAll","before","after","afterAll"];if(!s.includes(e))throw new Error(`Unexpected value for position to addHelpText. -Expecting one of '${s.join("', '")}'`);let h=`${e}Help`;return this.on(h,l=>{let o;typeof r=="function"?o=r({error:l.error,command:l.command}):o=r,o&&l.write(`${o} -`)}),this}};function yt(u,e){u._hasHelpOption&&e.find(s=>s===u._helpLongFlag||s===u._helpShortFlag)&&(u.outputHelp(),u._exit(0,"commander.helpDisplayed","(outputHelp)"))}function St(u){return u.map(e=>{if(!e.startsWith("--inspect"))return e;let r,s="127.0.0.1",h="9229",l;return(l=e.match(/^(--inspect(-brk)?)$/))!==null?r=l[1]:(l=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=l[1],/^\d+$/.test(l[3])?h=l[3]:s=l[3]):(l=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=l[1],s=l[3],h=l[4]),r&&h!=="0"?`${r}=${s}:${parseInt(h)+1}`:e})}function Re(u){let e=[];for(let r=u;r;r=r.parent)e.push(r);return e}Ft.Command=te});var Tt=_((J,Bt)=>{var{Argument:Qr}=me(),{Command:bt}=wt(),{CommanderError:Zr,InvalidArgumentError:kt}=ee(),{Help:es}=Ne(),{Option:ts}=Pe();J=Bt.exports=new bt;J.program=J;J.Argument=Qr;J.Command=bt;J.CommanderError=Zr;J.Help=es;J.InvalidArgumentError=kt;J.InvalidOptionArgumentError=kt;J.Option=ts});var Nt=_((ie,Xe)=>{(function(e,r){typeof ie=="object"&&typeof Xe=="object"?Xe.exports=r():typeof define=="function"&&define.amd?define([],r):typeof ie=="object"?ie.esprima=r():e.esprima=r()})(ie,function(){return function(u){var e={};function r(s){if(e[s])return e[s].exports;var h=e[s]={exports:{},id:s,loaded:!1};return u[s].call(h.exports,h,h.exports,r),h.loaded=!0,h.exports}return r.m=u,r.c=e,r.p="",r(0)}([function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(1),h=r(3),l=r(8),o=r(15);function D(c,t,i){var n=null,a=function(B,T){i&&i(B,T),n&&n.visit(B,T)},x=typeof i=="function"?a:null,E=!1;if(t){E=typeof t.comment=="boolean"&&t.comment;var C=typeof t.attachComment=="boolean"&&t.attachComment;(E||C)&&(n=new s.CommentHandler,n.attach=C,t.comment=!0,x=a)}var y=!1;t&&typeof t.sourceType=="string"&&(y=t.sourceType==="module");var S;t&&typeof t.jsx=="boolean"&&t.jsx?S=new h.JSXParser(c,t,x):S=new l.Parser(c,t,x);var w=y?S.parseModule():S.parseScript(),b=w;return E&&n&&(b.comments=n.comments),S.config.tokens&&(b.tokens=S.tokens),S.config.tolerant&&(b.errors=S.errorHandler.errors),b}e.parse=D;function m(c,t,i){var n=t||{};return n.sourceType="module",D(c,n,i)}e.parseModule=m;function f(c,t,i){var n=t||{};return n.sourceType="script",D(c,n,i)}e.parseScript=f;function p(c,t,i){var n=new o.Tokenizer(c,t),a;a=[];try{for(;;){var x=n.getNextToken();if(!x)break;i&&(x=i(x)),a.push(x)}}catch(E){n.errorHandler.tolerate(E)}return n.errorHandler.tolerant&&(a.errors=n.errors()),a}e.tokenize=p;var d=r(2);e.Syntax=d.Syntax,e.version="4.0.1"},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(2),h=function(){function l(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return l.prototype.insertInnerComments=function(o,D){if(o.type===s.Syntax.BlockStatement&&o.body.length===0){for(var m=[],f=this.leading.length-1;f>=0;--f){var p=this.leading[f];D.end.offset>=p.start&&(m.unshift(p.comment),this.leading.splice(f,1),this.trailing.splice(f,1))}m.length&&(o.innerComments=m)}},l.prototype.findTrailingComments=function(o){var D=[];if(this.trailing.length>0){for(var m=this.trailing.length-1;m>=0;--m){var f=this.trailing[m];f.start>=o.end.offset&&D.unshift(f.comment)}return this.trailing.length=0,D}var p=this.stack[this.stack.length-1];if(p&&p.node.trailingComments){var d=p.node.trailingComments[0];d&&d.range[0]>=o.end.offset&&(D=p.node.trailingComments,delete p.node.trailingComments)}return D},l.prototype.findLeadingComments=function(o){for(var D=[],m;this.stack.length>0;){var f=this.stack[this.stack.length-1];if(f&&f.start>=o.start.offset)m=f.node,this.stack.pop();else break}if(m){for(var p=m.leadingComments?m.leadingComments.length:0,d=p-1;d>=0;--d){var c=m.leadingComments[d];c.range[1]<=o.start.offset&&(D.unshift(c),m.leadingComments.splice(d,1))}return m.leadingComments&&m.leadingComments.length===0&&delete m.leadingComments,D}for(var d=this.leading.length-1;d>=0;--d){var f=this.leading[d];f.start<=o.start.offset&&(D.unshift(f.comment),this.leading.splice(d,1))}return D},l.prototype.visitNode=function(o,D){if(!(o.type===s.Syntax.Program&&o.body.length>0)){this.insertInnerComments(o,D);var m=this.findTrailingComments(D),f=this.findLeadingComments(D);f.length>0&&(o.leadingComments=f),m.length>0&&(o.trailingComments=m),this.stack.push({node:o,start:D.start.offset})}},l.prototype.visitComment=function(o,D){var m=o.type[0]==="L"?"Line":"Block",f={type:m,value:o.value};if(o.range&&(f.range=o.range),o.loc&&(f.loc=o.loc),this.comments.push(f),this.attach){var p={comment:{type:m,value:o.value,range:[D.start.offset,D.end.offset]},start:D.start.offset};o.loc&&(p.comment.loc=o.loc),o.type=m,this.leading.push(p),this.trailing.push(p)}},l.prototype.visit=function(o,D){o.type==="LineComment"?this.visitComment(o,D):o.type==="BlockComment"?this.visitComment(o,D):this.attach&&this.visitNode(o,D)},l}();e.CommentHandler=h},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(u,e,r){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])};return function(i,n){t(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(e,"__esModule",{value:!0});var h=r(4),l=r(5),o=r(6),D=r(7),m=r(8),f=r(13),p=r(14);f.TokenName[100]="JSXIdentifier",f.TokenName[101]="JSXText";function d(t){var i;switch(t.type){case o.JSXSyntax.JSXIdentifier:var n=t;i=n.name;break;case o.JSXSyntax.JSXNamespacedName:var a=t;i=d(a.namespace)+":"+d(a.name);break;case o.JSXSyntax.JSXMemberExpression:var x=t;i=d(x.object)+"."+d(x.property);break;default:break}return i}var c=function(t){s(i,t);function i(n,a,x){return t.call(this,n,a,x)||this}return i.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)},i.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},i.prototype.finishJSX=function(){this.nextToken()},i.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},i.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},i.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},i.prototype.scanXHTMLEntity=function(n){for(var a="&",x=!0,E=!1,C=!1,y=!1;!this.scanner.eof()&&x&&!E;){var S=this.scanner.source[this.scanner.index];if(S===n)break;if(E=S===";",a+=S,++this.scanner.index,!E)switch(a.length){case 2:C=S==="#";break;case 3:C&&(y=S==="x",x=y||h.Character.isDecimalDigit(S.charCodeAt(0)),C=C&&!y);break;default:x=x&&!(C&&!h.Character.isDecimalDigit(S.charCodeAt(0))),x=x&&!(y&&!h.Character.isHexDigit(S.charCodeAt(0)));break}}if(x&&E&&a.length>2){var w=a.substr(1,a.length-2);C&&w.length>1?a=String.fromCharCode(parseInt(w.substr(1),10)):y&&w.length>2?a=String.fromCharCode(parseInt("0"+w.substr(1),16)):!C&&!y&&p.XHTMLEntities[w]&&(a=p.XHTMLEntities[w])}return a},i.prototype.lexJSX=function(){var n=this.scanner.source.charCodeAt(this.scanner.index);if(n===60||n===62||n===47||n===58||n===61||n===123||n===125){var a=this.scanner.source[this.scanner.index++];return{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(n===34||n===39){for(var x=this.scanner.index,E=this.scanner.source[this.scanner.index++],C="";!this.scanner.eof();){var y=this.scanner.source[this.scanner.index++];if(y===E)break;y==="&"?C+=this.scanXHTMLEntity(E):C+=y}return{type:8,value:C,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(n===46){var S=this.scanner.source.charCodeAt(this.scanner.index+1),w=this.scanner.source.charCodeAt(this.scanner.index+2),a=S===46&&w===46?"...":".",x=this.scanner.index;return this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(n===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(h.Character.isIdentifierStart(n)&&n!==92){var x=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var y=this.scanner.source.charCodeAt(this.scanner.index);if(h.Character.isIdentifierPart(y)&&y!==92)++this.scanner.index;else if(y===45)++this.scanner.index;else break}var b=this.scanner.source.slice(x,this.scanner.index);return{type:100,value:b,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}return this.scanner.lex()},i.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var n=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(n)),n},i.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var n=this.scanner.index,a="";!this.scanner.eof();){var x=this.scanner.source[this.scanner.index];if(x==="{"||x==="<")break;++this.scanner.index,a+=x,h.Character.isLineTerminator(x.charCodeAt(0))&&(++this.scanner.lineNumber,x==="\r"&&this.scanner.source[this.scanner.index]===` -`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var E={type:101,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index};return a.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(E)),E},i.prototype.peekJSXToken=function(){var n=this.scanner.saveState();this.scanner.scanComments();var a=this.lexJSX();return this.scanner.restoreState(n),a},i.prototype.expectJSX=function(n){var a=this.nextJSXToken();(a.type!==7||a.value!==n)&&this.throwUnexpectedToken(a)},i.prototype.matchJSX=function(n){var a=this.peekJSXToken();return a.type===7&&a.value===n},i.prototype.parseJSXIdentifier=function(){var n=this.createJSXNode(),a=this.nextJSXToken();return a.type!==100&&this.throwUnexpectedToken(a),this.finalize(n,new l.JSXIdentifier(a.value))},i.prototype.parseJSXElementName=function(){var n=this.createJSXNode(),a=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=a;this.expectJSX(":");var E=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXNamespacedName(x,E))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var C=a;this.expectJSX(".");var y=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXMemberExpression(C,y))}return a},i.prototype.parseJSXAttributeName=function(){var n=this.createJSXNode(),a,x=this.parseJSXIdentifier();if(this.matchJSX(":")){var E=x;this.expectJSX(":");var C=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXNamespacedName(E,C))}else a=x;return a},i.prototype.parseJSXStringLiteralAttribute=function(){var n=this.createJSXNode(),a=this.nextJSXToken();a.type!==8&&this.throwUnexpectedToken(a);var x=this.getTokenRaw(a);return this.finalize(n,new D.Literal(a.value,x))},i.prototype.parseJSXExpressionAttribute=function(){var n=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var a=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(n,new l.JSXExpressionContainer(a))},i.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},i.prototype.parseJSXNameValueAttribute=function(){var n=this.createJSXNode(),a=this.parseJSXAttributeName(),x=null;return this.matchJSX("=")&&(this.expectJSX("="),x=this.parseJSXAttributeValue()),this.finalize(n,new l.JSXAttribute(a,x))},i.prototype.parseJSXSpreadAttribute=function(){var n=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var a=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(n,new l.JSXSpreadAttribute(a))},i.prototype.parseJSXAttributes=function(){for(var n=[];!this.matchJSX("/")&&!this.matchJSX(">");){var a=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();n.push(a)}return n},i.prototype.parseJSXOpeningElement=function(){var n=this.createJSXNode();this.expectJSX("<");var a=this.parseJSXElementName(),x=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(n,new l.JSXOpeningElement(a,E,x))},i.prototype.parseJSXBoundaryElement=function(){var n=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var a=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(n,new l.JSXClosingElement(a))}var x=this.parseJSXElementName(),E=this.parseJSXAttributes(),C=this.matchJSX("/");return C&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(n,new l.JSXOpeningElement(x,C,E))},i.prototype.parseJSXEmptyExpression=function(){var n=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(n,new l.JSXEmptyExpression)},i.prototype.parseJSXExpressionContainer=function(){var n=this.createJSXNode();this.expectJSX("{");var a;return this.matchJSX("}")?(a=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),a=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(n,new l.JSXExpressionContainer(a))},i.prototype.parseJSXChildren=function(){for(var n=[];!this.scanner.eof();){var a=this.createJSXChildNode(),x=this.nextJSXText();if(x.start0){var y=this.finalize(n.node,new l.JSXElement(n.opening,n.children,n.closing));n=a[a.length-1],n.children.push(y),a.pop()}else break}}return n},i.prototype.parseJSXElement=function(){var n=this.createJSXNode(),a=this.parseJSXOpeningElement(),x=[],E=null;if(!a.selfClosing){var C=this.parseComplexJSXElement({node:n,opening:a,closing:E,children:x});x=C.children,E=C.closing}return this.finalize(n,new l.JSXElement(a,x,E))},i.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var n=this.parseJSXElement();return this.finishJSX(),n},i.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")},i}(m.Parser);e.JSXParser=c},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(s){return s<65536?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10))+String.fromCharCode(56320+(s-65536&1023))},isWhiteSpace:function(s){return s===32||s===9||s===11||s===12||s===160||s>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(s)>=0},isLineTerminator:function(s){return s===10||s===13||s===8232||s===8233},isIdentifierStart:function(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s===92||s>=128&&r.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(s))},isIdentifierPart:function(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s>=48&&s<=57||s===92||s>=128&&r.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(s))},isDecimalDigit:function(s){return s>=48&&s<=57},isHexDigit:function(s){return s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102},isOctalDigit:function(s){return s>=48&&s<=55}}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(6),h=function(){function n(a){this.type=s.JSXSyntax.JSXClosingElement,this.name=a}return n}();e.JSXClosingElement=h;var l=function(){function n(a,x,E){this.type=s.JSXSyntax.JSXElement,this.openingElement=a,this.children=x,this.closingElement=E}return n}();e.JSXElement=l;var o=function(){function n(){this.type=s.JSXSyntax.JSXEmptyExpression}return n}();e.JSXEmptyExpression=o;var D=function(){function n(a){this.type=s.JSXSyntax.JSXExpressionContainer,this.expression=a}return n}();e.JSXExpressionContainer=D;var m=function(){function n(a){this.type=s.JSXSyntax.JSXIdentifier,this.name=a}return n}();e.JSXIdentifier=m;var f=function(){function n(a,x){this.type=s.JSXSyntax.JSXMemberExpression,this.object=a,this.property=x}return n}();e.JSXMemberExpression=f;var p=function(){function n(a,x){this.type=s.JSXSyntax.JSXAttribute,this.name=a,this.value=x}return n}();e.JSXAttribute=p;var d=function(){function n(a,x){this.type=s.JSXSyntax.JSXNamespacedName,this.namespace=a,this.name=x}return n}();e.JSXNamespacedName=d;var c=function(){function n(a,x,E){this.type=s.JSXSyntax.JSXOpeningElement,this.name=a,this.selfClosing=x,this.attributes=E}return n}();e.JSXOpeningElement=c;var t=function(){function n(a){this.type=s.JSXSyntax.JSXSpreadAttribute,this.argument=a}return n}();e.JSXSpreadAttribute=t;var i=function(){function n(a,x){this.type=s.JSXSyntax.JSXText,this.value=a,this.raw=x}return n}();e.JSXText=i},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(2),h=function(){function g(v){this.type=s.Syntax.ArrayExpression,this.elements=v}return g}();e.ArrayExpression=h;var l=function(){function g(v){this.type=s.Syntax.ArrayPattern,this.elements=v}return g}();e.ArrayPattern=l;var o=function(){function g(v,A,k){this.type=s.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=k,this.async=!1}return g}();e.ArrowFunctionExpression=o;var D=function(){function g(v,A,k){this.type=s.Syntax.AssignmentExpression,this.operator=v,this.left=A,this.right=k}return g}();e.AssignmentExpression=D;var m=function(){function g(v,A){this.type=s.Syntax.AssignmentPattern,this.left=v,this.right=A}return g}();e.AssignmentPattern=m;var f=function(){function g(v,A,k){this.type=s.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=k,this.async=!0}return g}();e.AsyncArrowFunctionExpression=f;var p=function(){function g(v,A,k){this.type=s.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=k,this.generator=!1,this.expression=!1,this.async=!0}return g}();e.AsyncFunctionDeclaration=p;var d=function(){function g(v,A,k){this.type=s.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=k,this.generator=!1,this.expression=!1,this.async=!0}return g}();e.AsyncFunctionExpression=d;var c=function(){function g(v){this.type=s.Syntax.AwaitExpression,this.argument=v}return g}();e.AwaitExpression=c;var t=function(){function g(v,A,k){var M=v==="||"||v==="&&";this.type=M?s.Syntax.LogicalExpression:s.Syntax.BinaryExpression,this.operator=v,this.left=A,this.right=k}return g}();e.BinaryExpression=t;var i=function(){function g(v){this.type=s.Syntax.BlockStatement,this.body=v}return g}();e.BlockStatement=i;var n=function(){function g(v){this.type=s.Syntax.BreakStatement,this.label=v}return g}();e.BreakStatement=n;var a=function(){function g(v,A){this.type=s.Syntax.CallExpression,this.callee=v,this.arguments=A}return g}();e.CallExpression=a;var x=function(){function g(v,A){this.type=s.Syntax.CatchClause,this.param=v,this.body=A}return g}();e.CatchClause=x;var E=function(){function g(v){this.type=s.Syntax.ClassBody,this.body=v}return g}();e.ClassBody=E;var C=function(){function g(v,A,k){this.type=s.Syntax.ClassDeclaration,this.id=v,this.superClass=A,this.body=k}return g}();e.ClassDeclaration=C;var y=function(){function g(v,A,k){this.type=s.Syntax.ClassExpression,this.id=v,this.superClass=A,this.body=k}return g}();e.ClassExpression=y;var S=function(){function g(v,A){this.type=s.Syntax.MemberExpression,this.computed=!0,this.object=v,this.property=A}return g}();e.ComputedMemberExpression=S;var w=function(){function g(v,A,k){this.type=s.Syntax.ConditionalExpression,this.test=v,this.consequent=A,this.alternate=k}return g}();e.ConditionalExpression=w;var b=function(){function g(v){this.type=s.Syntax.ContinueStatement,this.label=v}return g}();e.ContinueStatement=b;var B=function(){function g(){this.type=s.Syntax.DebuggerStatement}return g}();e.DebuggerStatement=B;var T=function(){function g(v,A){this.type=s.Syntax.ExpressionStatement,this.expression=v,this.directive=A}return g}();e.Directive=T;var N=function(){function g(v,A){this.type=s.Syntax.DoWhileStatement,this.body=v,this.test=A}return g}();e.DoWhileStatement=N;var O=function(){function g(){this.type=s.Syntax.EmptyStatement}return g}();e.EmptyStatement=O;var q=function(){function g(v){this.type=s.Syntax.ExportAllDeclaration,this.source=v}return g}();e.ExportAllDeclaration=q;var ye=function(){function g(v){this.type=s.Syntax.ExportDefaultDeclaration,this.declaration=v}return g}();e.ExportDefaultDeclaration=ye;var Ri=function(){function g(v,A,k){this.type=s.Syntax.ExportNamedDeclaration,this.declaration=v,this.specifiers=A,this.source=k}return g}();e.ExportNamedDeclaration=Ri;var Xi=function(){function g(v,A){this.type=s.Syntax.ExportSpecifier,this.exported=A,this.local=v}return g}();e.ExportSpecifier=Xi;var Ji=function(){function g(v){this.type=s.Syntax.ExpressionStatement,this.expression=v}return g}();e.ExpressionStatement=Ji;var Ui=function(){function g(v,A,k){this.type=s.Syntax.ForInStatement,this.left=v,this.right=A,this.body=k,this.each=!1}return g}();e.ForInStatement=Ui;var zi=function(){function g(v,A,k){this.type=s.Syntax.ForOfStatement,this.left=v,this.right=A,this.body=k}return g}();e.ForOfStatement=zi;var Hi=function(){function g(v,A,k,M){this.type=s.Syntax.ForStatement,this.init=v,this.test=A,this.update=k,this.body=M}return g}();e.ForStatement=Hi;var ji=function(){function g(v,A,k,M){this.type=s.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=k,this.generator=M,this.expression=!1,this.async=!1}return g}();e.FunctionDeclaration=ji;var Vi=function(){function g(v,A,k,M){this.type=s.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=k,this.generator=M,this.expression=!1,this.async=!1}return g}();e.FunctionExpression=Vi;var Ki=function(){function g(v){this.type=s.Syntax.Identifier,this.name=v}return g}();e.Identifier=Ki;var $i=function(){function g(v,A,k){this.type=s.Syntax.IfStatement,this.test=v,this.consequent=A,this.alternate=k}return g}();e.IfStatement=$i;var Gi=function(){function g(v,A){this.type=s.Syntax.ImportDeclaration,this.specifiers=v,this.source=A}return g}();e.ImportDeclaration=Gi;var Wi=function(){function g(v){this.type=s.Syntax.ImportDefaultSpecifier,this.local=v}return g}();e.ImportDefaultSpecifier=Wi;var qi=function(){function g(v){this.type=s.Syntax.ImportNamespaceSpecifier,this.local=v}return g}();e.ImportNamespaceSpecifier=qi;var Yi=function(){function g(v,A){this.type=s.Syntax.ImportSpecifier,this.local=v,this.imported=A}return g}();e.ImportSpecifier=Yi;var Qi=function(){function g(v,A){this.type=s.Syntax.LabeledStatement,this.label=v,this.body=A}return g}();e.LabeledStatement=Qi;var Zi=function(){function g(v,A){this.type=s.Syntax.Literal,this.value=v,this.raw=A}return g}();e.Literal=Zi;var er=function(){function g(v,A){this.type=s.Syntax.MetaProperty,this.meta=v,this.property=A}return g}();e.MetaProperty=er;var tr=function(){function g(v,A,k,M,Se){this.type=s.Syntax.MethodDefinition,this.key=v,this.computed=A,this.value=k,this.kind=M,this.static=Se}return g}();e.MethodDefinition=tr;var ir=function(){function g(v){this.type=s.Syntax.Program,this.body=v,this.sourceType="module"}return g}();e.Module=ir;var rr=function(){function g(v,A){this.type=s.Syntax.NewExpression,this.callee=v,this.arguments=A}return g}();e.NewExpression=rr;var sr=function(){function g(v){this.type=s.Syntax.ObjectExpression,this.properties=v}return g}();e.ObjectExpression=sr;var nr=function(){function g(v){this.type=s.Syntax.ObjectPattern,this.properties=v}return g}();e.ObjectPattern=nr;var ar=function(){function g(v,A,k,M,Se,Tr){this.type=s.Syntax.Property,this.key=A,this.computed=k,this.value=M,this.kind=v,this.method=Se,this.shorthand=Tr}return g}();e.Property=ar;var or=function(){function g(v,A,k,M){this.type=s.Syntax.Literal,this.value=v,this.raw=A,this.regex={pattern:k,flags:M}}return g}();e.RegexLiteral=or;var ur=function(){function g(v){this.type=s.Syntax.RestElement,this.argument=v}return g}();e.RestElement=ur;var hr=function(){function g(v){this.type=s.Syntax.ReturnStatement,this.argument=v}return g}();e.ReturnStatement=hr;var lr=function(){function g(v){this.type=s.Syntax.Program,this.body=v,this.sourceType="script"}return g}();e.Script=lr;var cr=function(){function g(v){this.type=s.Syntax.SequenceExpression,this.expressions=v}return g}();e.SequenceExpression=cr;var pr=function(){function g(v){this.type=s.Syntax.SpreadElement,this.argument=v}return g}();e.SpreadElement=pr;var fr=function(){function g(v,A){this.type=s.Syntax.MemberExpression,this.computed=!1,this.object=v,this.property=A}return g}();e.StaticMemberExpression=fr;var mr=function(){function g(){this.type=s.Syntax.Super}return g}();e.Super=mr;var dr=function(){function g(v,A){this.type=s.Syntax.SwitchCase,this.test=v,this.consequent=A}return g}();e.SwitchCase=dr;var xr=function(){function g(v,A){this.type=s.Syntax.SwitchStatement,this.discriminant=v,this.cases=A}return g}();e.SwitchStatement=xr;var Dr=function(){function g(v,A){this.type=s.Syntax.TaggedTemplateExpression,this.tag=v,this.quasi=A}return g}();e.TaggedTemplateExpression=Dr;var Er=function(){function g(v,A){this.type=s.Syntax.TemplateElement,this.value=v,this.tail=A}return g}();e.TemplateElement=Er;var gr=function(){function g(v,A){this.type=s.Syntax.TemplateLiteral,this.quasis=v,this.expressions=A}return g}();e.TemplateLiteral=gr;var vr=function(){function g(){this.type=s.Syntax.ThisExpression}return g}();e.ThisExpression=vr;var Cr=function(){function g(v){this.type=s.Syntax.ThrowStatement,this.argument=v}return g}();e.ThrowStatement=Cr;var Ar=function(){function g(v,A,k){this.type=s.Syntax.TryStatement,this.block=v,this.handler=A,this.finalizer=k}return g}();e.TryStatement=Ar;var yr=function(){function g(v,A){this.type=s.Syntax.UnaryExpression,this.operator=v,this.argument=A,this.prefix=!0}return g}();e.UnaryExpression=yr;var Sr=function(){function g(v,A,k){this.type=s.Syntax.UpdateExpression,this.operator=v,this.argument=A,this.prefix=k}return g}();e.UpdateExpression=Sr;var Fr=function(){function g(v,A){this.type=s.Syntax.VariableDeclaration,this.declarations=v,this.kind=A}return g}();e.VariableDeclaration=Fr;var wr=function(){function g(v,A){this.type=s.Syntax.VariableDeclarator,this.id=v,this.init=A}return g}();e.VariableDeclarator=wr;var br=function(){function g(v,A){this.type=s.Syntax.WhileStatement,this.test=v,this.body=A}return g}();e.WhileStatement=br;var kr=function(){function g(v,A){this.type=s.Syntax.WithStatement,this.object=v,this.body=A}return g}();e.WithStatement=kr;var Br=function(){function g(v,A){this.type=s.Syntax.YieldExpression,this.argument=v,this.delegate=A}return g}();e.YieldExpression=Br},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(9),h=r(10),l=r(11),o=r(7),D=r(12),m=r(2),f=r(13),p="ArrowParameterPlaceHolder",d=function(){function c(t,i,n){i===void 0&&(i={}),this.config={range:typeof i.range=="boolean"&&i.range,loc:typeof i.loc=="boolean"&&i.loc,source:null,tokens:typeof i.tokens=="boolean"&&i.tokens,comment:typeof i.comment=="boolean"&&i.comment,tolerant:typeof i.tolerant=="boolean"&&i.tolerant},this.config.loc&&i.source&&i.source!==null&&(this.config.source=String(i.source)),this.delegate=n,this.errorHandler=new h.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new D.Scanner(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return c.prototype.throwError=function(t){for(var i=[],n=1;n0&&this.delegate)for(var i=0;i>="||t===">>>="||t==="&="||t==="^="||t==="|="},c.prototype.isolateCoverGrammar=function(t){var i=this.context.isBindingElement,n=this.context.isAssignmentTarget,a=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=t.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=i,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=a,x},c.prototype.inheritCoverGrammar=function(t){var i=this.context.isBindingElement,n=this.context.isAssignmentTarget,a=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&i,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=a||this.context.firstCoverInitializedNameError,x},c.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},c.prototype.parsePrimaryExpression=function(){var t=this.createNode(),i,n,a;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),i=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(t,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(n.value,a));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(n.value==="true",a));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(null,a));break;case 10:i=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,i=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":i=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":i=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.RegexLiteral(n.regex,a,n.pattern,n.flags));break;default:i=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?i=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?i=this.finalize(t,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?i=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),i=this.finalize(t,new o.ThisExpression)):this.matchKeyword("class")?i=this.parseClassExpression():i=this.throwUnexpectedToken(this.nextToken()));break;default:i=this.throwUnexpectedToken(this.nextToken())}return i},c.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var i=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new o.SpreadElement(i))},c.prototype.parseArrayInitializer=function(){var t=this.createNode(),i=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),i.push(n)}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new o.ArrayExpression(i))},c.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var a=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=i,this.context.allowStrictDirective=n,a},c.prototype.parsePropertyMethodFunction=function(){var t=!1,i=this.createNode(),n=this.context.allowYield;this.context.allowYield=!0;var a=this.parseFormalParameters(),x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(i,new o.FunctionExpression(null,a.params,x,t))},c.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),i=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var a=this.parseFormalParameters(),x=this.parsePropertyMethod(a);return this.context.allowYield=i,this.context.await=n,this.finalize(t,new o.AsyncFunctionExpression(null,a.params,x))},c.prototype.parseObjectPropertyKey=function(){var t=this.createNode(),i=this.nextToken(),n;switch(i.type){case 8:case 6:this.context.strict&&i.octal&&this.tolerateUnexpectedToken(i,l.Messages.StrictOctalLiteral);var a=this.getTokenRaw(i);n=this.finalize(t,new o.Literal(i.value,a));break;case 3:case 1:case 5:case 4:n=this.finalize(t,new o.Identifier(i.value));break;case 7:i.value==="["?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(i);break;default:n=this.throwUnexpectedToken(i)}return n},c.prototype.isPropertyKey=function(t,i){return t.type===m.Syntax.Identifier&&t.name===i||t.type===m.Syntax.Literal&&t.value===i},c.prototype.parseObjectProperty=function(t){var i=this.createNode(),n=this.lookahead,a,x=null,E=null,C=!1,y=!1,S=!1,w=!1;if(n.type===3){var b=n.value;this.nextToken(),C=this.match("["),w=!this.hasLineTerminator&&b==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),x=w?this.parseObjectPropertyKey():this.finalize(i,new o.Identifier(b))}else this.match("*")?this.nextToken():(C=this.match("["),x=this.parseObjectPropertyKey());var B=this.qualifiedPropertyName(this.lookahead);if(n.type===3&&!w&&n.value==="get"&&B)a="get",C=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,E=this.parseGetterMethod();else if(n.type===3&&!w&&n.value==="set"&&B)a="set",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseSetterMethod();else if(n.type===7&&n.value==="*"&&B)a="init",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseGeneratorMethod(),y=!0;else if(x||this.throwUnexpectedToken(this.lookahead),a="init",this.match(":")&&!w)!C&&this.isPropertyKey(x,"__proto__")&&(t.value&&this.tolerateError(l.Messages.DuplicateProtoProperty),t.value=!0),this.nextToken(),E=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))E=w?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),y=!0;else if(n.type===3){var b=this.finalize(i,new o.Identifier(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),S=!0;var T=this.isolateCoverGrammar(this.parseAssignmentExpression);E=this.finalize(i,new o.AssignmentPattern(b,T))}else S=!0,E=b}else this.throwUnexpectedToken(this.nextToken());return this.finalize(i,new o.Property(a,x,C,E,y,S))},c.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var i=[],n={value:!1};!this.match("}");)i.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new o.ObjectExpression(i))},c.prototype.parseTemplateHead=function(){s.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),i=this.nextToken(),n=i.value,a=i.cooked;return this.finalize(t,new o.TemplateElement({raw:n,cooked:a},i.tail))},c.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var t=this.createNode(),i=this.nextToken(),n=i.value,a=i.cooked;return this.finalize(t,new o.TemplateElement({raw:n,cooked:a},i.tail))},c.prototype.parseTemplateLiteral=function(){var t=this.createNode(),i=[],n=[],a=this.parseTemplateHead();for(n.push(a);!a.tail;)i.push(this.parseExpression()),a=this.parseTemplateElement(),n.push(a);return this.finalize(t,new o.TemplateLiteral(n,i))},c.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case m.Syntax.Identifier:case m.Syntax.MemberExpression:case m.Syntax.RestElement:case m.Syntax.AssignmentPattern:break;case m.Syntax.SpreadElement:t.type=m.Syntax.RestElement,this.reinterpretExpressionAsPattern(t.argument);break;case m.Syntax.ArrayExpression:t.type=m.Syntax.ArrayPattern;for(var i=0;i")||this.expect("=>"),t={type:p,params:[],async:!1};else{var i=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:p,params:[t],async:!1};else{var a=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var x=[];for(this.context.isAssignmentTarget=!1,x.push(t);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var E=0;E")||this.expect("=>"),this.context.isBindingElement=!1;for(var E=0;E")&&(t.type===m.Syntax.Identifier&&t.name==="yield"&&(a=!0,t={type:p,params:[t],async:!1}),!a)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),t.type===m.Syntax.SequenceExpression)for(var E=0;E")){for(var y=0;y0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var x=[t,this.lookahead],E=i,C=this.isolateCoverGrammar(this.parseExponentiationExpression),y=[E,n.value,C],S=[a];a=this.binaryPrecedence(this.lookahead),!(a<=0);){for(;y.length>2&&a<=S[S.length-1];){C=y.pop();var w=y.pop();S.pop(),E=y.pop(),x.pop();var b=this.startNode(x[x.length-1]);y.push(this.finalize(b,new o.BinaryExpression(w,E,C)))}y.push(this.nextToken().value),S.push(a),x.push(this.lookahead),y.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var B=y.length-1;i=y[B];for(var T=x.pop();B>1;){var N=x.pop(),O=T&&T.lineStart,b=this.startNode(N,O),w=y[B-1];i=this.finalize(b,new o.BinaryExpression(w,y[B-2],i)),B-=2,T=N}}return i},c.prototype.parseConditionalExpression=function(){var t=this.lookahead,i=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var x=this.isolateCoverGrammar(this.parseAssignmentExpression);i=this.finalize(this.startNode(t),new o.ConditionalExpression(i,a,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return i},c.prototype.checkPatternParam=function(t,i){switch(i.type){case m.Syntax.Identifier:this.validateParam(t,i,i.name);break;case m.Syntax.RestElement:this.checkPatternParam(t,i.argument);break;case m.Syntax.AssignmentPattern:this.checkPatternParam(t,i.left);break;case m.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=t.async,E=this.reinterpretAsCoverFormalsList(t);if(E){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var C=this.context.strict,y=this.context.allowStrictDirective;this.context.allowStrictDirective=E.simple;var S=this.context.allowYield,w=this.context.await;this.context.allowYield=!0,this.context.await=x;var b=this.startNode(i);this.expect("=>");var B=void 0;if(this.match("{")){var T=this.context.allowIn;this.context.allowIn=!0,B=this.parseFunctionSourceElements(),this.context.allowIn=T}else B=this.isolateCoverGrammar(this.parseAssignmentExpression);var N=B.type!==m.Syntax.BlockStatement;this.context.strict&&E.firstRestricted&&this.throwUnexpectedToken(E.firstRestricted,E.message),this.context.strict&&E.stricted&&this.tolerateUnexpectedToken(E.stricted,E.message),t=x?this.finalize(b,new o.AsyncArrowFunctionExpression(E.params,B,N)):this.finalize(b,new o.ArrowFunctionExpression(E.params,B,N)),this.context.strict=C,this.context.allowStrictDirective=y,this.context.allowYield=S,this.context.await=w}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment),this.context.strict&&t.type===m.Syntax.Identifier){var O=t;this.scanner.isRestrictedWord(O.name)&&this.tolerateUnexpectedToken(n,l.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(O.name)&&this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var q=n.value,ye=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(i),new o.AssignmentExpression(q,t,ye)),this.context.firstCoverInitializedNameError=null}}return t},c.prototype.parseExpression=function(){var t=this.lookahead,i=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(i);this.lookahead.type!==2&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(t),new o.SequenceExpression(n))}return i},c.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.Messages.IllegalExportDeclaration),t=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.Messages.IllegalImportDeclaration),t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement();break}else t=this.parseStatement();return t},c.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var i=[];!this.match("}");)i.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new o.BlockStatement(i))},c.prototype.parseLexicalBinding=function(t,i){var n=this.createNode(),a=[],x=this.parsePattern(a,t);this.context.strict&&x.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(x.name)&&this.tolerateError(l.Messages.StrictVarName);var E=null;return t==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),E=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(l.Messages.DeclarationMissingInitializer,"const")):(!i.inFor&&x.type!==m.Syntax.Identifier||this.match("="))&&(this.expect("="),E=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(x,E))},c.prototype.parseBindingList=function(t,i){for(var n=[this.parseLexicalBinding(t,i)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(t,i));return n},c.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var i=this.scanner.lex();return this.scanner.restoreState(t),i.type===3||i.type===7&&i.value==="["||i.type===7&&i.value==="{"||i.type===4&&i.value==="let"||i.type===4&&i.value==="yield"},c.prototype.parseLexicalDeclaration=function(t){var i=this.createNode(),n=this.nextToken().value;s.assert(n==="let"||n==="const","Lexical declaration must be either let or const");var a=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(i,new o.VariableDeclaration(a,n))},c.prototype.parseBindingRestElement=function(t,i){var n=this.createNode();this.expect("...");var a=this.parsePattern(t,i);return this.finalize(n,new o.RestElement(a))},c.prototype.parseArrayPattern=function(t,i){var n=this.createNode();this.expect("[");for(var a=[];!this.match("]");)if(this.match(","))this.nextToken(),a.push(null);else{if(this.match("...")){a.push(this.parseBindingRestElement(t,i));break}else a.push(this.parsePatternWithDefault(t,i));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(a))},c.prototype.parsePropertyPattern=function(t,i){var n=this.createNode(),a=!1,x=!1,E=!1,C,y;if(this.lookahead.type===3){var S=this.lookahead;C=this.parseVariableIdentifier();var w=this.finalize(n,new o.Identifier(S.value));if(this.match("=")){t.push(S),x=!0,this.nextToken();var b=this.parseAssignmentExpression();y=this.finalize(this.startNode(S),new o.AssignmentPattern(w,b))}else this.match(":")?(this.expect(":"),y=this.parsePatternWithDefault(t,i)):(t.push(S),x=!0,y=w)}else a=this.match("["),C=this.parseObjectPropertyKey(),this.expect(":"),y=this.parsePatternWithDefault(t,i);return this.finalize(n,new o.Property("init",C,a,y,E,x))},c.prototype.parseObjectPattern=function(t,i){var n=this.createNode(),a=[];for(this.expect("{");!this.match("}");)a.push(this.parsePropertyPattern(t,i)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(a))},c.prototype.parsePattern=function(t,i){var n;return this.match("[")?n=this.parseArrayPattern(t,i):this.match("{")?n=this.parseObjectPattern(t,i):(this.matchKeyword("let")&&(i==="const"||i==="let")&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.LetInLexicalBinding),t.push(this.lookahead),n=this.parseVariableIdentifier(i)),n},c.prototype.parsePatternWithDefault=function(t,i){var n=this.lookahead,a=this.parsePattern(t,i);if(this.match("=")){this.nextToken();var x=this.context.allowYield;this.context.allowYield=!0;var E=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=x,a=this.finalize(this.startNode(n),new o.AssignmentPattern(a,E))}return a},c.prototype.parseVariableIdentifier=function(t){var i=this.createNode(),n=this.nextToken();return n.type===4&&n.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):n.type!==3?this.context.strict&&n.type===4&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord):(this.context.strict||n.value!=="let"||t!=="var")&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&n.type===3&&n.value==="await"&&this.tolerateUnexpectedToken(n),this.finalize(i,new o.Identifier(n.value))},c.prototype.parseVariableDeclaration=function(t){var i=this.createNode(),n=[],a=this.parsePattern(n,"var");this.context.strict&&a.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(l.Messages.StrictVarName);var x=null;return this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):a.type!==m.Syntax.Identifier&&!t.inFor&&this.expect("="),this.finalize(i,new o.VariableDeclarator(a,x))},c.prototype.parseVariableDeclarationList=function(t){var i={inFor:t.inFor},n=[];for(n.push(this.parseVariableDeclaration(i));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(i));return n},c.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var i=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(i,"var"))},c.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new o.EmptyStatement)},c.prototype.parseExpressionStatement=function(){var t=this.createNode(),i=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ExpressionStatement(i))},c.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(l.Messages.StrictFunction),this.parseStatement()},c.prototype.parseIfStatement=function(){var t=this.createNode(),i,n=null;this.expectKeyword("if"),this.expect("(");var a=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),i=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(a,i,n))},c.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var i=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=i,this.expectKeyword("while"),this.expect("(");var a=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new o.DoWhileStatement(n,a))},c.prototype.parseWhileStatement=function(){var t=this.createNode(),i;this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var a=this.context.inIteration;this.context.inIteration=!0,i=this.parseStatement(),this.context.inIteration=a}return this.finalize(t,new o.WhileStatement(n,i))},c.prototype.parseForStatement=function(){var t=null,i=null,n=null,a=!0,x,E,C=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){t=this.createNode(),this.nextToken();var y=this.context.allowIn;this.context.allowIn=!1;var S=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=y,S.length===1&&this.matchKeyword("in")){var w=S[0];w.init&&(w.id.type===m.Syntax.ArrayPattern||w.id.type===m.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(l.Messages.ForInOfLoopInitializer,"for-in"),t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.nextToken(),x=t,E=this.parseExpression(),t=null}else S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.nextToken(),x=t,E=this.parseAssignmentExpression(),t=null,a=!1):(t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){t=this.createNode();var b=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")t=this.finalize(t,new o.Identifier(b)),this.nextToken(),x=t,E=this.parseExpression(),t=null;else{var y=this.context.allowIn;this.context.allowIn=!1;var S=this.parseBindingList(b,{inFor:!0});this.context.allowIn=y,S.length===1&&S[0].init===null&&this.matchKeyword("in")?(t=this.finalize(t,new o.VariableDeclaration(S,b)),this.nextToken(),x=t,E=this.parseExpression(),t=null):S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(t=this.finalize(t,new o.VariableDeclaration(S,b)),this.nextToken(),x=t,E=this.parseAssignmentExpression(),t=null,a=!1):(this.consumeSemicolon(),t=this.finalize(t,new o.VariableDeclaration(S,b)))}}else{var B=this.lookahead,y=this.context.allowIn;if(this.context.allowIn=!1,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=y,this.matchKeyword("in"))(!this.context.isAssignmentTarget||t.type===m.Syntax.AssignmentExpression)&&this.tolerateError(l.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(t),x=t,E=this.parseExpression(),t=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||t.type===m.Syntax.AssignmentExpression)&&this.tolerateError(l.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(t),x=t,E=this.parseAssignmentExpression(),t=null,a=!1;else{if(this.match(",")){for(var T=[t];this.match(",");)this.nextToken(),T.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(B),new o.SequenceExpression(T))}this.expect(";")}}typeof x>"u"&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(n=this.parseExpression()));var N;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),N=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var O=this.context.inIteration;this.context.inIteration=!0,N=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=O}return typeof x>"u"?this.finalize(C,new o.ForStatement(t,i,n,N)):a?this.finalize(C,new o.ForInStatement(x,E,N)):this.finalize(C,new o.ForOfStatement(x,E,N))},c.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var i=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();i=n;var a="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,a)||this.throwError(l.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),i===null&&!this.context.inIteration&&this.throwError(l.Messages.IllegalContinue),this.finalize(t,new o.ContinueStatement(i))},c.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var i=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),a="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,a)||this.throwError(l.Messages.UnknownLabel,n.name),i=n}return this.consumeSemicolon(),i===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(l.Messages.IllegalBreak),this.finalize(t,new o.BreakStatement(i))},c.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(l.Messages.IllegalReturn);var t=this.createNode();this.expectKeyword("return");var i=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,n=i?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(t,new o.ReturnStatement(n))},c.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(l.Messages.StrictModeWith);var t=this.createNode(),i;this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),i=this.parseStatement()),this.finalize(t,new o.WithStatement(n,i))},c.prototype.parseSwitchCase=function(){var t=this.createNode(),i;this.matchKeyword("default")?(this.nextToken(),i=null):(this.expectKeyword("case"),i=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(i,n))},c.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var i=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var a=[],x=!1;for(this.expect("{");!this.match("}");){var E=this.parseSwitchCase();E.test===null&&(x&&this.throwError(l.Messages.MultipleDefaultsInSwitch),x=!0),a.push(E)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new o.SwitchStatement(i,a))},c.prototype.parseLabelledStatement=function(){var t=this.createNode(),i=this.parseExpression(),n;if(i.type===m.Syntax.Identifier&&this.match(":")){this.nextToken();var a=i,x="$"+a.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,x)&&this.throwError(l.Messages.Redeclaration,"Label",a.name),this.context.labelSet[x]=!0;var E=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),E=this.parseClassDeclaration();else if(this.matchKeyword("function")){var C=this.lookahead,y=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(C,l.Messages.StrictFunction):y.generator&&this.tolerateUnexpectedToken(C,l.Messages.GeneratorInLegacyContext),E=y}else E=this.parseStatement();delete this.context.labelSet[x],n=new o.LabeledStatement(a,E)}else this.consumeSemicolon(),n=new o.ExpressionStatement(i);return this.finalize(t,n)},c.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(l.Messages.NewlineAfterThrow);var i=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ThrowStatement(i))},c.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var i=[],n=this.parsePattern(i),a={},x=0;x0&&this.tolerateError(l.Messages.BadGetterArity);var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.parseSetterMethod=function(){var t=this.createNode(),i=!1,n=this.context.allowYield;this.context.allowYield=!i;var a=this.parseFormalParameters();a.params.length!==1?this.tolerateError(l.Messages.BadSetterArity):a.params[0]instanceof o.RestElement&&this.tolerateError(l.Messages.BadSetterRestParameter);var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.parseGeneratorMethod=function(){var t=this.createNode(),i=!0,n=this.context.allowYield;this.context.allowYield=!0;var a=this.parseFormalParameters();this.context.allowYield=!1;var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.isStartOfExpression=function(){var t=!0,i=this.lookahead.value;switch(this.lookahead.type){case 7:t=i==="["||i==="("||i==="{"||i==="+"||i==="-"||i==="!"||i==="~"||i==="++"||i==="--"||i==="/"||i==="/=";break;case 4:t=i==="class"||i==="delete"||i==="function"||i==="let"||i==="new"||i==="super"||i==="this"||i==="typeof"||i==="void"||i==="yield";break;default:break}return t},c.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var i=null,n=!1;if(!this.hasLineTerminator){var a=this.context.allowYield;this.context.allowYield=!1,n=this.match("*"),n?(this.nextToken(),i=this.parseAssignmentExpression()):this.isStartOfExpression()&&(i=this.parseAssignmentExpression()),this.context.allowYield=a}return this.finalize(t,new o.YieldExpression(i,n))},c.prototype.parseClassElement=function(t){var i=this.lookahead,n=this.createNode(),a="",x=null,E=null,C=!1,y=!1,S=!1,w=!1;if(this.match("*"))this.nextToken();else{C=this.match("["),x=this.parseObjectPropertyKey();var b=x;if(b.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(i=this.lookahead,S=!0,C=this.match("["),this.match("*")?this.nextToken():x=this.parseObjectPropertyKey()),i.type===3&&!this.hasLineTerminator&&i.value==="async"){var B=this.lookahead.value;B!==":"&&B!=="("&&B!=="*"&&(w=!0,i=this.lookahead,x=this.parseObjectPropertyKey(),i.type===3&&i.value==="constructor"&&this.tolerateUnexpectedToken(i,l.Messages.ConstructorIsAsync))}}var T=this.qualifiedPropertyName(this.lookahead);return i.type===3?i.value==="get"&&T?(a="get",C=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,E=this.parseGetterMethod()):i.value==="set"&&T&&(a="set",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseSetterMethod()):i.type===7&&i.value==="*"&&T&&(a="init",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseGeneratorMethod(),y=!0),!a&&x&&this.match("(")&&(a="init",E=w?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),y=!0),a||this.throwUnexpectedToken(this.lookahead),a==="init"&&(a="method"),C||(S&&this.isPropertyKey(x,"prototype")&&this.throwUnexpectedToken(i,l.Messages.StaticPrototype),!S&&this.isPropertyKey(x,"constructor")&&((a!=="method"||!y||E&&E.generator)&&this.throwUnexpectedToken(i,l.Messages.ConstructorSpecialMethod),t.value?this.throwUnexpectedToken(i,l.Messages.DuplicateConstructor):t.value=!0,a="constructor")),this.finalize(n,new o.MethodDefinition(x,C,E,a,S))},c.prototype.parseClassElementList=function(){var t=[],i={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(i));return this.expect("}"),t},c.prototype.parseClassBody=function(){var t=this.createNode(),i=this.parseClassElementList();return this.finalize(t,new o.ClassBody(i))},c.prototype.parseClassDeclaration=function(t){var i=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var a=t&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),x=null;this.matchKeyword("extends")&&(this.nextToken(),x=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var E=this.parseClassBody();return this.context.strict=n,this.finalize(i,new o.ClassDeclaration(a,x,E))},c.prototype.parseClassExpression=function(){var t=this.createNode(),i=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=this.lookahead.type===3?this.parseVariableIdentifier():null,a=null;this.matchKeyword("extends")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=i,this.finalize(t,new o.ClassExpression(n,a,x))},c.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),i=this.parseDirectivePrologues();this.lookahead.type!==2;)i.push(this.parseStatementListItem());return this.finalize(t,new o.Module(i))},c.prototype.parseScript=function(){for(var t=this.createNode(),i=this.parseDirectivePrologues();this.lookahead.type!==2;)i.push(this.parseStatementListItem());return this.finalize(t,new o.Script(i))},c.prototype.parseModuleSpecifier=function(){var t=this.createNode();this.lookahead.type!==8&&this.throwError(l.Messages.InvalidModuleSpecifier);var i=this.nextToken(),n=this.getTokenRaw(i);return this.finalize(t,new o.Literal(i.value,n))},c.prototype.parseImportSpecifier=function(){var t=this.createNode(),i,n;return this.lookahead.type===3?(i=this.parseVariableIdentifier(),n=i,this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseVariableIdentifier())):(i=this.parseIdentifierName(),n=i,this.matchContextualKeyword("as")?(this.nextToken(),n=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(t,new o.ImportSpecifier(n,i))},c.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},c.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),i=this.parseIdentifierName();return this.finalize(t,new o.ImportDefaultSpecifier(i))},c.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(l.Messages.NoAsAfterImportNamespace),this.nextToken();var i=this.parseIdentifierName();return this.finalize(t,new o.ImportNamespaceSpecifier(i))},c.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalImportDeclaration);var t=this.createNode();this.expectKeyword("import");var i,n=[];if(this.lookahead.type===8)i=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}this.nextToken(),i=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,i))},c.prototype.parseExportSpecifier=function(){var t=this.createNode(),i=this.parseIdentifierName(),n=i;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(t,new o.ExportSpecifier(i,n))},c.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalExportDeclaration);var t=this.createNode();this.expectKeyword("export");var i;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){var n=this.parseClassDeclaration(!0);i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){var n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(l.Messages.UnexpectedToken,this.lookahead.value);var n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}this.nextToken();var x=this.parseModuleSpecifier();this.consumeSemicolon(),i=this.finalize(t,new o.ExportAllDeclaration(x))}else if(this.lookahead.type===4){var n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}i=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){var n=this.parseFunctionDeclaration();i=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else{var E=[],C=null,y=!1;for(this.expect("{");!this.match("}");)y=y||this.matchKeyword("default"),E.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),C=this.parseModuleSpecifier(),this.consumeSemicolon();else if(y){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}else this.consumeSemicolon();i=this.finalize(t,new o.ExportNamedDeclaration(null,E,C))}return i},c}();e.Parser=d},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function r(s,h){if(!s)throw new Error("ASSERT: "+h)}e.assert=r},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function s(){this.errors=[],this.tolerant=!1}return s.prototype.recordError=function(h){this.errors.push(h)},s.prototype.tolerate=function(h){if(this.tolerant)this.recordError(h);else throw h},s.prototype.constructError=function(h,l){var o=new Error(h);try{throw o}catch(D){Object.create&&Object.defineProperty&&(o=Object.create(D),Object.defineProperty(o,"column",{value:l}))}return o},s.prototype.createError=function(h,l,o,D){var m="Line "+l+": "+D,f=this.constructError(m,o);return f.index=h,f.lineNumber=l,f.description=D,f},s.prototype.throwError=function(h,l,o,D){throw this.createError(h,l,o,D)},s.prototype.tolerateError=function(h,l,o,D){var m=this.createError(h,l,o,D);if(this.tolerant)this.recordError(m);else throw m},s}();e.ErrorHandler=r},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(9),h=r(4),l=r(11);function o(f){return"0123456789abcdef".indexOf(f.toLowerCase())}function D(f){return"01234567".indexOf(f)}var m=function(){function f(p,d){this.source=p,this.errorHandler=d,this.trackComment=!1,this.isModule=!1,this.length=p.length,this.index=0,this.lineNumber=p.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return f.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},f.prototype.restoreState=function(p){this.index=p.index,this.lineNumber=p.lineNumber,this.lineStart=p.lineStart},f.prototype.eof=function(){return this.index>=this.length},f.prototype.throwUnexpectedToken=function(p){return p===void 0&&(p=l.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},f.prototype.tolerateUnexpectedToken=function(p){p===void 0&&(p=l.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},f.prototype.skipSingleLineComment=function(p){var d=[],c,t;for(this.trackComment&&(d=[],c=this.index-p,t={start:{line:this.lineNumber,column:this.index-this.lineStart-p},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,h.Character.isLineTerminator(i)){if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart-1};var n={multiLine:!1,slice:[c+p,this.index-1],range:[c,this.index-1],loc:t};d.push(n)}return i===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d}}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!1,slice:[c+p,this.index],range:[c,this.index],loc:t};d.push(n)}return d},f.prototype.skipMultiLineComment=function(){var p=[],d,c;for(this.trackComment&&(p=[],d=this.index-2,c={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var t=this.source.charCodeAt(this.index);if(h.Character.isLineTerminator(t))t===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(t===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){c.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[d+2,this.index-2],range:[d,this.index],loc:c};p.push(i)}return p}++this.index}else++this.index}if(this.trackComment){c.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[d+2,this.index],range:[d,this.index],loc:c};p.push(i)}return this.tolerateUnexpectedToken(),p},f.prototype.scanComments=function(){var p;this.trackComment&&(p=[]);for(var d=this.index===0;!this.eof();){var c=this.source.charCodeAt(this.index);if(h.Character.isWhiteSpace(c))++this.index;else if(h.Character.isLineTerminator(c))++this.index,c===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d=!0;else if(c===47)if(c=this.source.charCodeAt(this.index+1),c===47){this.index+=2;var t=this.skipSingleLineComment(2);this.trackComment&&(p=p.concat(t)),d=!0}else if(c===42){this.index+=2;var t=this.skipMultiLineComment();this.trackComment&&(p=p.concat(t))}else break;else if(d&&c===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var t=this.skipSingleLineComment(3);this.trackComment&&(p=p.concat(t))}else break;else if(c===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var t=this.skipSingleLineComment(4);this.trackComment&&(p=p.concat(t))}else break;else break}return p},f.prototype.isFutureReservedWord=function(p){switch(p){case"enum":case"export":case"import":case"super":return!0;default:return!1}},f.prototype.isStrictModeReservedWord=function(p){switch(p){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},f.prototype.isRestrictedWord=function(p){return p==="eval"||p==="arguments"},f.prototype.isKeyword=function(p){switch(p.length){case 2:return p==="if"||p==="in"||p==="do";case 3:return p==="var"||p==="for"||p==="new"||p==="try"||p==="let";case 4:return p==="this"||p==="else"||p==="case"||p==="void"||p==="with"||p==="enum";case 5:return p==="while"||p==="break"||p==="catch"||p==="throw"||p==="const"||p==="yield"||p==="class"||p==="super";case 6:return p==="return"||p==="typeof"||p==="delete"||p==="switch"||p==="export"||p==="import";case 7:return p==="default"||p==="finally"||p==="extends";case 8:return p==="function"||p==="continue"||p==="debugger";case 10:return p==="instanceof";default:return!1}},f.prototype.codePointAt=function(p){var d=this.source.charCodeAt(p);if(d>=55296&&d<=56319){var c=this.source.charCodeAt(p+1);if(c>=56320&&c<=57343){var t=d;d=(t-55296)*1024+c-56320+65536}}return d},f.prototype.scanHexEscape=function(p){for(var d=p==="u"?4:2,c=0,t=0;t1114111||p!=="}")&&this.throwUnexpectedToken(),h.Character.fromCodePoint(d)},f.prototype.getIdentifier=function(){for(var p=this.index++;!this.eof();){var d=this.source.charCodeAt(this.index);if(d===92)return this.index=p,this.getComplexIdentifier();if(d>=55296&&d<57343)return this.index=p,this.getComplexIdentifier();if(h.Character.isIdentifierPart(d))++this.index;else break}return this.source.slice(p,this.index)},f.prototype.getComplexIdentifier=function(){var p=this.codePointAt(this.index),d=h.Character.fromCodePoint(p);this.index+=d.length;var c;for(p===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,c=this.scanUnicodeCodePointEscape()):(c=this.scanHexEscape("u"),(c===null||c==="\\"||!h.Character.isIdentifierStart(c.charCodeAt(0)))&&this.throwUnexpectedToken()),d=c);!this.eof()&&(p=this.codePointAt(this.index),!!h.Character.isIdentifierPart(p));)c=h.Character.fromCodePoint(p),d+=c,this.index+=c.length,p===92&&(d=d.substr(0,d.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,c=this.scanUnicodeCodePointEscape()):(c=this.scanHexEscape("u"),(c===null||c==="\\"||!h.Character.isIdentifierPart(c.charCodeAt(0)))&&this.throwUnexpectedToken()),d+=c);return d},f.prototype.octalToDecimal=function(p){var d=p!=="0",c=D(p);return!this.eof()&&h.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=!0,c=c*8+D(this.source[this.index++]),"0123".indexOf(p)>=0&&!this.eof()&&h.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(c=c*8+D(this.source[this.index++]))),{code:c,octal:d}},f.prototype.scanIdentifier=function(){var p,d=this.index,c=this.source.charCodeAt(d)===92?this.getComplexIdentifier():this.getIdentifier();if(c.length===1?p=3:this.isKeyword(c)?p=4:c==="null"?p=5:c==="true"||c==="false"?p=1:p=3,p!==3&&d+c.length!==this.index){var t=this.index;this.index=d,this.tolerateUnexpectedToken(l.Messages.InvalidEscapedReservedWord),this.index=t}return{type:p,value:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},f.prototype.scanPunctuator=function(){var p=this.index,d=this.source[this.index];switch(d){case"(":case"{":d==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,d="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:d=this.source.substr(this.index,4),d===">>>="?this.index+=4:(d=d.substr(0,3),d==="==="||d==="!=="||d===">>>"||d==="<<="||d===">>="||d==="**="?this.index+=3:(d=d.substr(0,2),d==="&&"||d==="||"||d==="=="||d==="!="||d==="+="||d==="-="||d==="*="||d==="/="||d==="++"||d==="--"||d==="<<"||d===">>"||d==="&="||d==="|="||d==="^="||d==="%="||d==="<="||d===">="||d==="=>"||d==="**"?this.index+=2:(d=this.source[this.index],"<>=!+-*%&|^/".indexOf(d)>=0&&++this.index)))}return this.index===p&&this.throwUnexpectedToken(),{type:7,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanHexLiteral=function(p){for(var d="";!this.eof()&&h.Character.isHexDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),h.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+d,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanBinaryLiteral=function(p){for(var d="",c;!this.eof()&&(c=this.source[this.index],!(c!=="0"&&c!=="1"));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),this.eof()||(c=this.source.charCodeAt(this.index),(h.Character.isIdentifierStart(c)||h.Character.isDecimalDigit(c))&&this.throwUnexpectedToken()),{type:6,value:parseInt(d,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanOctalLiteral=function(p,d){var c="",t=!1;for(h.Character.isOctalDigit(p.charCodeAt(0))?(t=!0,c="0"+this.source[this.index++]):++this.index;!this.eof()&&h.Character.isOctalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];return!t&&c.length===0&&this.throwUnexpectedToken(),(h.Character.isIdentifierStart(this.source.charCodeAt(this.index))||h.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(c,8),octal:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},f.prototype.isImplicitOctalLiteral=function(){for(var p=this.index+1;p{if(e.envVar&&e.envVar in process.env){let s=e.attributeName();(this.getOptionValue(s)===void 0||["default","config","env"].includes(this.getOptionValueSource(s)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,process.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}missingArgument(e){let s=`error: missing required argument '${e}'`;this._displayError(1,"commander.missingArgument",s)}optionMissingArgument(e){let s=`error: option '${e.flags}' argument missing`;this._displayError(1,"commander.optionMissingArgument",s)}missingMandatoryOptionValue(e){let s=`error: required option '${e.flags}' not specified`;this._displayError(1,"commander.missingMandatoryOptionValue",s)}unknownOption(e){if(this._allowUnknownOption)return;let s="";if(e.startsWith("--")&&this._showSuggestionAfterError){let u=[],l=this;do{let o=l.createHelp().visibleOptions(l).filter(D=>D.long).map(D=>D.long);u=u.concat(o),l=l.parent}while(l&&!l._enablePositionalOptions);s=At(e,u)}let r=`error: unknown option '${e}'${s}`;this._displayError(1,"commander.unknownOption",r)}_excessArguments(e){if(this._allowExcessArguments)return;let s=this._args.length,r=s===1?"":"s",l=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${s} argument${r} but got ${e.length}.`;this._displayError(1,"commander.excessArguments",l)}unknownCommand(){let e=this.args[0],s="";if(this._showSuggestionAfterError){let u=[];this.createHelp().visibleCommands(this).forEach(l=>{u.push(l.name()),l.alias()&&u.push(l.alias())}),s=At(e,u)}let r=`error: unknown command '${e}'${s}`;this._displayError(1,"commander.unknownCommand",r)}version(e,s,r){if(e===void 0)return this._version;this._version=e,s=s||"-V, --version",r=r||"output the version number";let u=this.createOption(s,r);return this._versionOptionName=u.attributeName(),this.options.push(u),this.on("option:"+u.name(),()=>{this._outputConfiguration.writeOut(`${e} +`),this._exit(0,"commander.version",e)}),this}description(e,s){return e===void 0&&s===void 0?this._description:(this._description=e,s&&(this._argsDescription=s),this)}alias(e){if(e===void 0)return this._aliases[0];let s=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(s=this.commands[this.commands.length-1]),e===s._name)throw new Error("Command alias can't be the same as its name");return s._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(s=>this.alias(s)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let s=this._args.map(r=>Gs(r));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?s:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpInformation(e){let s=this.createHelp();return s.helpWidth===void 0&&(s.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),s.formatHelp(this,s)}_getHelpContext(e){e=e||{};let s={error:!!e.error},r;return s.error?r=u=>this._outputConfiguration.writeErr(u):r=u=>this._outputConfiguration.writeOut(u),s.write=e.write||r,s.command=this,s}outputHelp(e){let s;typeof e=="function"&&(s=e,e=void 0);let r=this._getHelpContext(e);Re(this).reverse().forEach(l=>l.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let u=this.helpInformation(r);if(s&&(u=s(u),typeof u!="string"&&!Buffer.isBuffer(u)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(u),this.emit(this._helpLongFlag),this.emit("afterHelp",r),Re(this).forEach(l=>l.emit("afterAllHelp",r))}helpOption(e,s){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=s||this._helpDescription;let r=Ys(this._helpFlags);return this._helpShortFlag=r.shortFlag,this._helpLongFlag=r.longFlag,this}help(e){this.outputHelp(e);let s=process.exitCode||0;s===0&&e&&typeof e!="function"&&e.error&&(s=1),this._exit(s,"commander.help","(outputHelp)")}addHelpText(e,s){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText. +Expecting one of '${r.join("', '")}'`);let u=`${e}Help`;return this.on(u,l=>{let o;typeof s=="function"?o=s({error:l.error,command:l.command}):o=s,o&&l.write(`${o} +`)}),this}};function yt(h,e){h._hasHelpOption&&e.find(r=>r===h._helpLongFlag||r===h._helpShortFlag)&&(h.outputHelp(),h._exit(0,"commander.helpDisplayed","(outputHelp)"))}function St(h){return h.map(e=>{if(!e.startsWith("--inspect"))return e;let s,r="127.0.0.1",u="9229",l;return(l=e.match(/^(--inspect(-brk)?)$/))!==null?s=l[1]:(l=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(s=l[1],/^\d+$/.test(l[3])?u=l[3]:r=l[3]):(l=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(s=l[1],r=l[3],u=l[4]),s&&u!=="0"?`${s}=${r}:${parseInt(u)+1}`:e})}function Re(h){let e=[];for(let s=h;s;s=s.parent)e.push(s);return e}Ft.Command=ie});var Tt=_((U,Bt)=>{var{Argument:Qs}=fe(),{Command:bt}=wt(),{CommanderError:Zs,InvalidArgumentError:kt}=te(),{Help:er}=_e(),{Option:tr}=Oe();U=Bt.exports=new bt;U.program=U;U.Argument=Qs;U.Command=bt;U.CommanderError=Zs;U.Help=er;U.InvalidArgumentError=kt;U.InvalidOptionArgumentError=kt;U.Option=tr});var Nt=_((se,Je)=>{(function(e,s){typeof se=="object"&&typeof Je=="object"?Je.exports=s():typeof define=="function"&&define.amd?define([],s):typeof se=="object"?se.esprima=s():e.esprima=s()})(se,function(){return function(h){var e={};function s(r){if(e[r])return e[r].exports;var u=e[r]={exports:{},id:r,loaded:!1};return h[r].call(u.exports,u,u.exports,s),u.loaded=!0,u.exports}return s.m=h,s.c=e,s.p="",s(0)}([function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(1),u=s(3),l=s(8),o=s(15);function D(c,t,i){var n=null,a=function(B,T){i&&i(B,T),n&&n.visit(B,T)},x=typeof i=="function"?a:null,E=!1;if(t){E=typeof t.comment=="boolean"&&t.comment;var C=typeof t.attachComment=="boolean"&&t.attachComment;(E||C)&&(n=new r.CommentHandler,n.attach=C,t.comment=!0,x=a)}var y=!1;t&&typeof t.sourceType=="string"&&(y=t.sourceType==="module");var S;t&&typeof t.jsx=="boolean"&&t.jsx?S=new u.JSXParser(c,t,x):S=new l.Parser(c,t,x);var w=y?S.parseModule():S.parseScript(),b=w;return E&&n&&(b.comments=n.comments),S.config.tokens&&(b.tokens=S.tokens),S.config.tolerant&&(b.errors=S.errorHandler.errors),b}e.parse=D;function m(c,t,i){var n=t||{};return n.sourceType="module",D(c,n,i)}e.parseModule=m;function f(c,t,i){var n=t||{};return n.sourceType="script",D(c,n,i)}e.parseScript=f;function p(c,t,i){var n=new o.Tokenizer(c,t),a;a=[];try{for(;;){var x=n.getNextToken();if(!x)break;i&&(x=i(x)),a.push(x)}}catch(E){n.errorHandler.tolerate(E)}return n.errorHandler.tolerant&&(a.errors=n.errors()),a}e.tokenize=p;var d=s(2);e.Syntax=d.Syntax,e.version="4.0.1"},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(2),u=function(){function l(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return l.prototype.insertInnerComments=function(o,D){if(o.type===r.Syntax.BlockStatement&&o.body.length===0){for(var m=[],f=this.leading.length-1;f>=0;--f){var p=this.leading[f];D.end.offset>=p.start&&(m.unshift(p.comment),this.leading.splice(f,1),this.trailing.splice(f,1))}m.length&&(o.innerComments=m)}},l.prototype.findTrailingComments=function(o){var D=[];if(this.trailing.length>0){for(var m=this.trailing.length-1;m>=0;--m){var f=this.trailing[m];f.start>=o.end.offset&&D.unshift(f.comment)}return this.trailing.length=0,D}var p=this.stack[this.stack.length-1];if(p&&p.node.trailingComments){var d=p.node.trailingComments[0];d&&d.range[0]>=o.end.offset&&(D=p.node.trailingComments,delete p.node.trailingComments)}return D},l.prototype.findLeadingComments=function(o){for(var D=[],m;this.stack.length>0;){var f=this.stack[this.stack.length-1];if(f&&f.start>=o.start.offset)m=f.node,this.stack.pop();else break}if(m){for(var p=m.leadingComments?m.leadingComments.length:0,d=p-1;d>=0;--d){var c=m.leadingComments[d];c.range[1]<=o.start.offset&&(D.unshift(c),m.leadingComments.splice(d,1))}return m.leadingComments&&m.leadingComments.length===0&&delete m.leadingComments,D}for(var d=this.leading.length-1;d>=0;--d){var f=this.leading[d];f.start<=o.start.offset&&(D.unshift(f.comment),this.leading.splice(d,1))}return D},l.prototype.visitNode=function(o,D){if(!(o.type===r.Syntax.Program&&o.body.length>0)){this.insertInnerComments(o,D);var m=this.findTrailingComments(D),f=this.findLeadingComments(D);f.length>0&&(o.leadingComments=f),m.length>0&&(o.trailingComments=m),this.stack.push({node:o,start:D.start.offset})}},l.prototype.visitComment=function(o,D){var m=o.type[0]==="L"?"Line":"Block",f={type:m,value:o.value};if(o.range&&(f.range=o.range),o.loc&&(f.loc=o.loc),this.comments.push(f),this.attach){var p={comment:{type:m,value:o.value,range:[D.start.offset,D.end.offset]},start:D.start.offset};o.loc&&(p.comment.loc=o.loc),o.type=m,this.leading.push(p),this.trailing.push(p)}},l.prototype.visit=function(o,D){o.type==="LineComment"?this.visitComment(o,D):o.type==="BlockComment"?this.visitComment(o,D):this.attach&&this.visitNode(o,D)},l}();e.CommentHandler=u},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(h,e,s){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])};return function(i,n){t(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(e,"__esModule",{value:!0});var u=s(4),l=s(5),o=s(6),D=s(7),m=s(8),f=s(13),p=s(14);f.TokenName[100]="JSXIdentifier",f.TokenName[101]="JSXText";function d(t){var i;switch(t.type){case o.JSXSyntax.JSXIdentifier:var n=t;i=n.name;break;case o.JSXSyntax.JSXNamespacedName:var a=t;i=d(a.namespace)+":"+d(a.name);break;case o.JSXSyntax.JSXMemberExpression:var x=t;i=d(x.object)+"."+d(x.property);break;default:break}return i}var c=function(t){r(i,t);function i(n,a,x){return t.call(this,n,a,x)||this}return i.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)},i.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},i.prototype.finishJSX=function(){this.nextToken()},i.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},i.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},i.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},i.prototype.scanXHTMLEntity=function(n){for(var a="&",x=!0,E=!1,C=!1,y=!1;!this.scanner.eof()&&x&&!E;){var S=this.scanner.source[this.scanner.index];if(S===n)break;if(E=S===";",a+=S,++this.scanner.index,!E)switch(a.length){case 2:C=S==="#";break;case 3:C&&(y=S==="x",x=y||u.Character.isDecimalDigit(S.charCodeAt(0)),C=C&&!y);break;default:x=x&&!(C&&!u.Character.isDecimalDigit(S.charCodeAt(0))),x=x&&!(y&&!u.Character.isHexDigit(S.charCodeAt(0)));break}}if(x&&E&&a.length>2){var w=a.substr(1,a.length-2);C&&w.length>1?a=String.fromCharCode(parseInt(w.substr(1),10)):y&&w.length>2?a=String.fromCharCode(parseInt("0"+w.substr(1),16)):!C&&!y&&p.XHTMLEntities[w]&&(a=p.XHTMLEntities[w])}return a},i.prototype.lexJSX=function(){var n=this.scanner.source.charCodeAt(this.scanner.index);if(n===60||n===62||n===47||n===58||n===61||n===123||n===125){var a=this.scanner.source[this.scanner.index++];return{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(n===34||n===39){for(var x=this.scanner.index,E=this.scanner.source[this.scanner.index++],C="";!this.scanner.eof();){var y=this.scanner.source[this.scanner.index++];if(y===E)break;y==="&"?C+=this.scanXHTMLEntity(E):C+=y}return{type:8,value:C,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(n===46){var S=this.scanner.source.charCodeAt(this.scanner.index+1),w=this.scanner.source.charCodeAt(this.scanner.index+2),a=S===46&&w===46?"...":".",x=this.scanner.index;return this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(n===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(u.Character.isIdentifierStart(n)&&n!==92){var x=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var y=this.scanner.source.charCodeAt(this.scanner.index);if(u.Character.isIdentifierPart(y)&&y!==92)++this.scanner.index;else if(y===45)++this.scanner.index;else break}var b=this.scanner.source.slice(x,this.scanner.index);return{type:100,value:b,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}return this.scanner.lex()},i.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var n=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(n)),n},i.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var n=this.scanner.index,a="";!this.scanner.eof();){var x=this.scanner.source[this.scanner.index];if(x==="{"||x==="<")break;++this.scanner.index,a+=x,u.Character.isLineTerminator(x.charCodeAt(0))&&(++this.scanner.lineNumber,x==="\r"&&this.scanner.source[this.scanner.index]===` +`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var E={type:101,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index};return a.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(E)),E},i.prototype.peekJSXToken=function(){var n=this.scanner.saveState();this.scanner.scanComments();var a=this.lexJSX();return this.scanner.restoreState(n),a},i.prototype.expectJSX=function(n){var a=this.nextJSXToken();(a.type!==7||a.value!==n)&&this.throwUnexpectedToken(a)},i.prototype.matchJSX=function(n){var a=this.peekJSXToken();return a.type===7&&a.value===n},i.prototype.parseJSXIdentifier=function(){var n=this.createJSXNode(),a=this.nextJSXToken();return a.type!==100&&this.throwUnexpectedToken(a),this.finalize(n,new l.JSXIdentifier(a.value))},i.prototype.parseJSXElementName=function(){var n=this.createJSXNode(),a=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=a;this.expectJSX(":");var E=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXNamespacedName(x,E))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var C=a;this.expectJSX(".");var y=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXMemberExpression(C,y))}return a},i.prototype.parseJSXAttributeName=function(){var n=this.createJSXNode(),a,x=this.parseJSXIdentifier();if(this.matchJSX(":")){var E=x;this.expectJSX(":");var C=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXNamespacedName(E,C))}else a=x;return a},i.prototype.parseJSXStringLiteralAttribute=function(){var n=this.createJSXNode(),a=this.nextJSXToken();a.type!==8&&this.throwUnexpectedToken(a);var x=this.getTokenRaw(a);return this.finalize(n,new D.Literal(a.value,x))},i.prototype.parseJSXExpressionAttribute=function(){var n=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var a=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(n,new l.JSXExpressionContainer(a))},i.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},i.prototype.parseJSXNameValueAttribute=function(){var n=this.createJSXNode(),a=this.parseJSXAttributeName(),x=null;return this.matchJSX("=")&&(this.expectJSX("="),x=this.parseJSXAttributeValue()),this.finalize(n,new l.JSXAttribute(a,x))},i.prototype.parseJSXSpreadAttribute=function(){var n=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var a=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(n,new l.JSXSpreadAttribute(a))},i.prototype.parseJSXAttributes=function(){for(var n=[];!this.matchJSX("/")&&!this.matchJSX(">");){var a=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();n.push(a)}return n},i.prototype.parseJSXOpeningElement=function(){var n=this.createJSXNode();this.expectJSX("<");var a=this.parseJSXElementName(),x=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(n,new l.JSXOpeningElement(a,E,x))},i.prototype.parseJSXBoundaryElement=function(){var n=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var a=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(n,new l.JSXClosingElement(a))}var x=this.parseJSXElementName(),E=this.parseJSXAttributes(),C=this.matchJSX("/");return C&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(n,new l.JSXOpeningElement(x,C,E))},i.prototype.parseJSXEmptyExpression=function(){var n=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(n,new l.JSXEmptyExpression)},i.prototype.parseJSXExpressionContainer=function(){var n=this.createJSXNode();this.expectJSX("{");var a;return this.matchJSX("}")?(a=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),a=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(n,new l.JSXExpressionContainer(a))},i.prototype.parseJSXChildren=function(){for(var n=[];!this.scanner.eof();){var a=this.createJSXChildNode(),x=this.nextJSXText();if(x.start0){var y=this.finalize(n.node,new l.JSXElement(n.opening,n.children,n.closing));n=a[a.length-1],n.children.push(y),a.pop()}else break}}return n},i.prototype.parseJSXElement=function(){var n=this.createJSXNode(),a=this.parseJSXOpeningElement(),x=[],E=null;if(!a.selfClosing){var C=this.parseComplexJSXElement({node:n,opening:a,closing:E,children:x});x=C.children,E=C.closing}return this.finalize(n,new l.JSXElement(a,x,E))},i.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var n=this.parseJSXElement();return this.finishJSX(),n},i.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")},i}(m.Parser);e.JSXParser=c},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(r){return r<65536?String.fromCharCode(r):String.fromCharCode(55296+(r-65536>>10))+String.fromCharCode(56320+(r-65536&1023))},isWhiteSpace:function(r){return r===32||r===9||r===11||r===12||r===160||r>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(r)>=0},isLineTerminator:function(r){return r===10||r===13||r===8232||r===8233},isIdentifierStart:function(r){return r===36||r===95||r>=65&&r<=90||r>=97&&r<=122||r===92||r>=128&&s.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(r))},isIdentifierPart:function(r){return r===36||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=48&&r<=57||r===92||r>=128&&s.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(r))},isDecimalDigit:function(r){return r>=48&&r<=57},isHexDigit:function(r){return r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102},isOctalDigit:function(r){return r>=48&&r<=55}}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(6),u=function(){function n(a){this.type=r.JSXSyntax.JSXClosingElement,this.name=a}return n}();e.JSXClosingElement=u;var l=function(){function n(a,x,E){this.type=r.JSXSyntax.JSXElement,this.openingElement=a,this.children=x,this.closingElement=E}return n}();e.JSXElement=l;var o=function(){function n(){this.type=r.JSXSyntax.JSXEmptyExpression}return n}();e.JSXEmptyExpression=o;var D=function(){function n(a){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=a}return n}();e.JSXExpressionContainer=D;var m=function(){function n(a){this.type=r.JSXSyntax.JSXIdentifier,this.name=a}return n}();e.JSXIdentifier=m;var f=function(){function n(a,x){this.type=r.JSXSyntax.JSXMemberExpression,this.object=a,this.property=x}return n}();e.JSXMemberExpression=f;var p=function(){function n(a,x){this.type=r.JSXSyntax.JSXAttribute,this.name=a,this.value=x}return n}();e.JSXAttribute=p;var d=function(){function n(a,x){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=a,this.name=x}return n}();e.JSXNamespacedName=d;var c=function(){function n(a,x,E){this.type=r.JSXSyntax.JSXOpeningElement,this.name=a,this.selfClosing=x,this.attributes=E}return n}();e.JSXOpeningElement=c;var t=function(){function n(a){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=a}return n}();e.JSXSpreadAttribute=t;var i=function(){function n(a,x){this.type=r.JSXSyntax.JSXText,this.value=a,this.raw=x}return n}();e.JSXText=i},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(2),u=function(){function g(v){this.type=r.Syntax.ArrayExpression,this.elements=v}return g}();e.ArrayExpression=u;var l=function(){function g(v){this.type=r.Syntax.ArrayPattern,this.elements=v}return g}();e.ArrayPattern=l;var o=function(){function g(v,A,k){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=k,this.async=!1}return g}();e.ArrowFunctionExpression=o;var D=function(){function g(v,A,k){this.type=r.Syntax.AssignmentExpression,this.operator=v,this.left=A,this.right=k}return g}();e.AssignmentExpression=D;var m=function(){function g(v,A){this.type=r.Syntax.AssignmentPattern,this.left=v,this.right=A}return g}();e.AssignmentPattern=m;var f=function(){function g(v,A,k){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=k,this.async=!0}return g}();e.AsyncArrowFunctionExpression=f;var p=function(){function g(v,A,k){this.type=r.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=k,this.generator=!1,this.expression=!1,this.async=!0}return g}();e.AsyncFunctionDeclaration=p;var d=function(){function g(v,A,k){this.type=r.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=k,this.generator=!1,this.expression=!1,this.async=!0}return g}();e.AsyncFunctionExpression=d;var c=function(){function g(v){this.type=r.Syntax.AwaitExpression,this.argument=v}return g}();e.AwaitExpression=c;var t=function(){function g(v,A,k){var M=v==="||"||v==="&&";this.type=M?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=v,this.left=A,this.right=k}return g}();e.BinaryExpression=t;var i=function(){function g(v){this.type=r.Syntax.BlockStatement,this.body=v}return g}();e.BlockStatement=i;var n=function(){function g(v){this.type=r.Syntax.BreakStatement,this.label=v}return g}();e.BreakStatement=n;var a=function(){function g(v,A){this.type=r.Syntax.CallExpression,this.callee=v,this.arguments=A}return g}();e.CallExpression=a;var x=function(){function g(v,A){this.type=r.Syntax.CatchClause,this.param=v,this.body=A}return g}();e.CatchClause=x;var E=function(){function g(v){this.type=r.Syntax.ClassBody,this.body=v}return g}();e.ClassBody=E;var C=function(){function g(v,A,k){this.type=r.Syntax.ClassDeclaration,this.id=v,this.superClass=A,this.body=k}return g}();e.ClassDeclaration=C;var y=function(){function g(v,A,k){this.type=r.Syntax.ClassExpression,this.id=v,this.superClass=A,this.body=k}return g}();e.ClassExpression=y;var S=function(){function g(v,A){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=v,this.property=A}return g}();e.ComputedMemberExpression=S;var w=function(){function g(v,A,k){this.type=r.Syntax.ConditionalExpression,this.test=v,this.consequent=A,this.alternate=k}return g}();e.ConditionalExpression=w;var b=function(){function g(v){this.type=r.Syntax.ContinueStatement,this.label=v}return g}();e.ContinueStatement=b;var B=function(){function g(){this.type=r.Syntax.DebuggerStatement}return g}();e.DebuggerStatement=B;var T=function(){function g(v,A){this.type=r.Syntax.ExpressionStatement,this.expression=v,this.directive=A}return g}();e.Directive=T;var N=function(){function g(v,A){this.type=r.Syntax.DoWhileStatement,this.body=v,this.test=A}return g}();e.DoWhileStatement=N;var O=function(){function g(){this.type=r.Syntax.EmptyStatement}return g}();e.EmptyStatement=O;var Y=function(){function g(v){this.type=r.Syntax.ExportAllDeclaration,this.source=v}return g}();e.ExportAllDeclaration=Y;var ye=function(){function g(v){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=v}return g}();e.ExportDefaultDeclaration=ye;var Xi=function(){function g(v,A,k){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=v,this.specifiers=A,this.source=k}return g}();e.ExportNamedDeclaration=Xi;var Ri=function(){function g(v,A){this.type=r.Syntax.ExportSpecifier,this.exported=A,this.local=v}return g}();e.ExportSpecifier=Ri;var Ji=function(){function g(v){this.type=r.Syntax.ExpressionStatement,this.expression=v}return g}();e.ExpressionStatement=Ji;var Ui=function(){function g(v,A,k){this.type=r.Syntax.ForInStatement,this.left=v,this.right=A,this.body=k,this.each=!1}return g}();e.ForInStatement=Ui;var zi=function(){function g(v,A,k){this.type=r.Syntax.ForOfStatement,this.left=v,this.right=A,this.body=k}return g}();e.ForOfStatement=zi;var Hi=function(){function g(v,A,k,M){this.type=r.Syntax.ForStatement,this.init=v,this.test=A,this.update=k,this.body=M}return g}();e.ForStatement=Hi;var ji=function(){function g(v,A,k,M){this.type=r.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=k,this.generator=M,this.expression=!1,this.async=!1}return g}();e.FunctionDeclaration=ji;var Vi=function(){function g(v,A,k,M){this.type=r.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=k,this.generator=M,this.expression=!1,this.async=!1}return g}();e.FunctionExpression=Vi;var Ki=function(){function g(v){this.type=r.Syntax.Identifier,this.name=v}return g}();e.Identifier=Ki;var $i=function(){function g(v,A,k){this.type=r.Syntax.IfStatement,this.test=v,this.consequent=A,this.alternate=k}return g}();e.IfStatement=$i;var Gi=function(){function g(v,A){this.type=r.Syntax.ImportDeclaration,this.specifiers=v,this.source=A}return g}();e.ImportDeclaration=Gi;var Wi=function(){function g(v){this.type=r.Syntax.ImportDefaultSpecifier,this.local=v}return g}();e.ImportDefaultSpecifier=Wi;var qi=function(){function g(v){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=v}return g}();e.ImportNamespaceSpecifier=qi;var Yi=function(){function g(v,A){this.type=r.Syntax.ImportSpecifier,this.local=v,this.imported=A}return g}();e.ImportSpecifier=Yi;var Qi=function(){function g(v,A){this.type=r.Syntax.LabeledStatement,this.label=v,this.body=A}return g}();e.LabeledStatement=Qi;var Zi=function(){function g(v,A){this.type=r.Syntax.Literal,this.value=v,this.raw=A}return g}();e.Literal=Zi;var es=function(){function g(v,A){this.type=r.Syntax.MetaProperty,this.meta=v,this.property=A}return g}();e.MetaProperty=es;var ts=function(){function g(v,A,k,M,Se){this.type=r.Syntax.MethodDefinition,this.key=v,this.computed=A,this.value=k,this.kind=M,this.static=Se}return g}();e.MethodDefinition=ts;var is=function(){function g(v){this.type=r.Syntax.Program,this.body=v,this.sourceType="module"}return g}();e.Module=is;var ss=function(){function g(v,A){this.type=r.Syntax.NewExpression,this.callee=v,this.arguments=A}return g}();e.NewExpression=ss;var rs=function(){function g(v){this.type=r.Syntax.ObjectExpression,this.properties=v}return g}();e.ObjectExpression=rs;var ns=function(){function g(v){this.type=r.Syntax.ObjectPattern,this.properties=v}return g}();e.ObjectPattern=ns;var as=function(){function g(v,A,k,M,Se,Ts){this.type=r.Syntax.Property,this.key=A,this.computed=k,this.value=M,this.kind=v,this.method=Se,this.shorthand=Ts}return g}();e.Property=as;var os=function(){function g(v,A,k,M){this.type=r.Syntax.Literal,this.value=v,this.raw=A,this.regex={pattern:k,flags:M}}return g}();e.RegexLiteral=os;var us=function(){function g(v){this.type=r.Syntax.RestElement,this.argument=v}return g}();e.RestElement=us;var hs=function(){function g(v){this.type=r.Syntax.ReturnStatement,this.argument=v}return g}();e.ReturnStatement=hs;var ls=function(){function g(v){this.type=r.Syntax.Program,this.body=v,this.sourceType="script"}return g}();e.Script=ls;var cs=function(){function g(v){this.type=r.Syntax.SequenceExpression,this.expressions=v}return g}();e.SequenceExpression=cs;var ps=function(){function g(v){this.type=r.Syntax.SpreadElement,this.argument=v}return g}();e.SpreadElement=ps;var fs=function(){function g(v,A){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=v,this.property=A}return g}();e.StaticMemberExpression=fs;var ms=function(){function g(){this.type=r.Syntax.Super}return g}();e.Super=ms;var ds=function(){function g(v,A){this.type=r.Syntax.SwitchCase,this.test=v,this.consequent=A}return g}();e.SwitchCase=ds;var xs=function(){function g(v,A){this.type=r.Syntax.SwitchStatement,this.discriminant=v,this.cases=A}return g}();e.SwitchStatement=xs;var Ds=function(){function g(v,A){this.type=r.Syntax.TaggedTemplateExpression,this.tag=v,this.quasi=A}return g}();e.TaggedTemplateExpression=Ds;var Es=function(){function g(v,A){this.type=r.Syntax.TemplateElement,this.value=v,this.tail=A}return g}();e.TemplateElement=Es;var gs=function(){function g(v,A){this.type=r.Syntax.TemplateLiteral,this.quasis=v,this.expressions=A}return g}();e.TemplateLiteral=gs;var vs=function(){function g(){this.type=r.Syntax.ThisExpression}return g}();e.ThisExpression=vs;var Cs=function(){function g(v){this.type=r.Syntax.ThrowStatement,this.argument=v}return g}();e.ThrowStatement=Cs;var As=function(){function g(v,A,k){this.type=r.Syntax.TryStatement,this.block=v,this.handler=A,this.finalizer=k}return g}();e.TryStatement=As;var ys=function(){function g(v,A){this.type=r.Syntax.UnaryExpression,this.operator=v,this.argument=A,this.prefix=!0}return g}();e.UnaryExpression=ys;var Ss=function(){function g(v,A,k){this.type=r.Syntax.UpdateExpression,this.operator=v,this.argument=A,this.prefix=k}return g}();e.UpdateExpression=Ss;var Fs=function(){function g(v,A){this.type=r.Syntax.VariableDeclaration,this.declarations=v,this.kind=A}return g}();e.VariableDeclaration=Fs;var ws=function(){function g(v,A){this.type=r.Syntax.VariableDeclarator,this.id=v,this.init=A}return g}();e.VariableDeclarator=ws;var bs=function(){function g(v,A){this.type=r.Syntax.WhileStatement,this.test=v,this.body=A}return g}();e.WhileStatement=bs;var ks=function(){function g(v,A){this.type=r.Syntax.WithStatement,this.object=v,this.body=A}return g}();e.WithStatement=ks;var Bs=function(){function g(v,A){this.type=r.Syntax.YieldExpression,this.argument=v,this.delegate=A}return g}();e.YieldExpression=Bs},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(9),u=s(10),l=s(11),o=s(7),D=s(12),m=s(2),f=s(13),p="ArrowParameterPlaceHolder",d=function(){function c(t,i,n){i===void 0&&(i={}),this.config={range:typeof i.range=="boolean"&&i.range,loc:typeof i.loc=="boolean"&&i.loc,source:null,tokens:typeof i.tokens=="boolean"&&i.tokens,comment:typeof i.comment=="boolean"&&i.comment,tolerant:typeof i.tolerant=="boolean"&&i.tolerant},this.config.loc&&i.source&&i.source!==null&&(this.config.source=String(i.source)),this.delegate=n,this.errorHandler=new u.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new D.Scanner(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return c.prototype.throwError=function(t){for(var i=[],n=1;n0&&this.delegate)for(var i=0;i>="||t===">>>="||t==="&="||t==="^="||t==="|="},c.prototype.isolateCoverGrammar=function(t){var i=this.context.isBindingElement,n=this.context.isAssignmentTarget,a=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=t.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=i,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=a,x},c.prototype.inheritCoverGrammar=function(t){var i=this.context.isBindingElement,n=this.context.isAssignmentTarget,a=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&i,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=a||this.context.firstCoverInitializedNameError,x},c.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},c.prototype.parsePrimaryExpression=function(){var t=this.createNode(),i,n,a;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),i=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(t,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(n.value,a));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(n.value==="true",a));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(null,a));break;case 10:i=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,i=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":i=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":i=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.RegexLiteral(n.regex,a,n.pattern,n.flags));break;default:i=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?i=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?i=this.finalize(t,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?i=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),i=this.finalize(t,new o.ThisExpression)):this.matchKeyword("class")?i=this.parseClassExpression():i=this.throwUnexpectedToken(this.nextToken()));break;default:i=this.throwUnexpectedToken(this.nextToken())}return i},c.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var i=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new o.SpreadElement(i))},c.prototype.parseArrayInitializer=function(){var t=this.createNode(),i=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),i.push(n)}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new o.ArrayExpression(i))},c.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var a=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=i,this.context.allowStrictDirective=n,a},c.prototype.parsePropertyMethodFunction=function(){var t=!1,i=this.createNode(),n=this.context.allowYield;this.context.allowYield=!0;var a=this.parseFormalParameters(),x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(i,new o.FunctionExpression(null,a.params,x,t))},c.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),i=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var a=this.parseFormalParameters(),x=this.parsePropertyMethod(a);return this.context.allowYield=i,this.context.await=n,this.finalize(t,new o.AsyncFunctionExpression(null,a.params,x))},c.prototype.parseObjectPropertyKey=function(){var t=this.createNode(),i=this.nextToken(),n;switch(i.type){case 8:case 6:this.context.strict&&i.octal&&this.tolerateUnexpectedToken(i,l.Messages.StrictOctalLiteral);var a=this.getTokenRaw(i);n=this.finalize(t,new o.Literal(i.value,a));break;case 3:case 1:case 5:case 4:n=this.finalize(t,new o.Identifier(i.value));break;case 7:i.value==="["?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(i);break;default:n=this.throwUnexpectedToken(i)}return n},c.prototype.isPropertyKey=function(t,i){return t.type===m.Syntax.Identifier&&t.name===i||t.type===m.Syntax.Literal&&t.value===i},c.prototype.parseObjectProperty=function(t){var i=this.createNode(),n=this.lookahead,a,x=null,E=null,C=!1,y=!1,S=!1,w=!1;if(n.type===3){var b=n.value;this.nextToken(),C=this.match("["),w=!this.hasLineTerminator&&b==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),x=w?this.parseObjectPropertyKey():this.finalize(i,new o.Identifier(b))}else this.match("*")?this.nextToken():(C=this.match("["),x=this.parseObjectPropertyKey());var B=this.qualifiedPropertyName(this.lookahead);if(n.type===3&&!w&&n.value==="get"&&B)a="get",C=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,E=this.parseGetterMethod();else if(n.type===3&&!w&&n.value==="set"&&B)a="set",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseSetterMethod();else if(n.type===7&&n.value==="*"&&B)a="init",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseGeneratorMethod(),y=!0;else if(x||this.throwUnexpectedToken(this.lookahead),a="init",this.match(":")&&!w)!C&&this.isPropertyKey(x,"__proto__")&&(t.value&&this.tolerateError(l.Messages.DuplicateProtoProperty),t.value=!0),this.nextToken(),E=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))E=w?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),y=!0;else if(n.type===3){var b=this.finalize(i,new o.Identifier(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),S=!0;var T=this.isolateCoverGrammar(this.parseAssignmentExpression);E=this.finalize(i,new o.AssignmentPattern(b,T))}else S=!0,E=b}else this.throwUnexpectedToken(this.nextToken());return this.finalize(i,new o.Property(a,x,C,E,y,S))},c.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var i=[],n={value:!1};!this.match("}");)i.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new o.ObjectExpression(i))},c.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),i=this.nextToken(),n=i.value,a=i.cooked;return this.finalize(t,new o.TemplateElement({raw:n,cooked:a},i.tail))},c.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var t=this.createNode(),i=this.nextToken(),n=i.value,a=i.cooked;return this.finalize(t,new o.TemplateElement({raw:n,cooked:a},i.tail))},c.prototype.parseTemplateLiteral=function(){var t=this.createNode(),i=[],n=[],a=this.parseTemplateHead();for(n.push(a);!a.tail;)i.push(this.parseExpression()),a=this.parseTemplateElement(),n.push(a);return this.finalize(t,new o.TemplateLiteral(n,i))},c.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case m.Syntax.Identifier:case m.Syntax.MemberExpression:case m.Syntax.RestElement:case m.Syntax.AssignmentPattern:break;case m.Syntax.SpreadElement:t.type=m.Syntax.RestElement,this.reinterpretExpressionAsPattern(t.argument);break;case m.Syntax.ArrayExpression:t.type=m.Syntax.ArrayPattern;for(var i=0;i")||this.expect("=>"),t={type:p,params:[],async:!1};else{var i=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:p,params:[t],async:!1};else{var a=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var x=[];for(this.context.isAssignmentTarget=!1,x.push(t);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var E=0;E")||this.expect("=>"),this.context.isBindingElement=!1;for(var E=0;E")&&(t.type===m.Syntax.Identifier&&t.name==="yield"&&(a=!0,t={type:p,params:[t],async:!1}),!a)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),t.type===m.Syntax.SequenceExpression)for(var E=0;E")){for(var y=0;y0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var x=[t,this.lookahead],E=i,C=this.isolateCoverGrammar(this.parseExponentiationExpression),y=[E,n.value,C],S=[a];a=this.binaryPrecedence(this.lookahead),!(a<=0);){for(;y.length>2&&a<=S[S.length-1];){C=y.pop();var w=y.pop();S.pop(),E=y.pop(),x.pop();var b=this.startNode(x[x.length-1]);y.push(this.finalize(b,new o.BinaryExpression(w,E,C)))}y.push(this.nextToken().value),S.push(a),x.push(this.lookahead),y.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var B=y.length-1;i=y[B];for(var T=x.pop();B>1;){var N=x.pop(),O=T&&T.lineStart,b=this.startNode(N,O),w=y[B-1];i=this.finalize(b,new o.BinaryExpression(w,y[B-2],i)),B-=2,T=N}}return i},c.prototype.parseConditionalExpression=function(){var t=this.lookahead,i=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var x=this.isolateCoverGrammar(this.parseAssignmentExpression);i=this.finalize(this.startNode(t),new o.ConditionalExpression(i,a,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return i},c.prototype.checkPatternParam=function(t,i){switch(i.type){case m.Syntax.Identifier:this.validateParam(t,i,i.name);break;case m.Syntax.RestElement:this.checkPatternParam(t,i.argument);break;case m.Syntax.AssignmentPattern:this.checkPatternParam(t,i.left);break;case m.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=t.async,E=this.reinterpretAsCoverFormalsList(t);if(E){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var C=this.context.strict,y=this.context.allowStrictDirective;this.context.allowStrictDirective=E.simple;var S=this.context.allowYield,w=this.context.await;this.context.allowYield=!0,this.context.await=x;var b=this.startNode(i);this.expect("=>");var B=void 0;if(this.match("{")){var T=this.context.allowIn;this.context.allowIn=!0,B=this.parseFunctionSourceElements(),this.context.allowIn=T}else B=this.isolateCoverGrammar(this.parseAssignmentExpression);var N=B.type!==m.Syntax.BlockStatement;this.context.strict&&E.firstRestricted&&this.throwUnexpectedToken(E.firstRestricted,E.message),this.context.strict&&E.stricted&&this.tolerateUnexpectedToken(E.stricted,E.message),t=x?this.finalize(b,new o.AsyncArrowFunctionExpression(E.params,B,N)):this.finalize(b,new o.ArrowFunctionExpression(E.params,B,N)),this.context.strict=C,this.context.allowStrictDirective=y,this.context.allowYield=S,this.context.await=w}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment),this.context.strict&&t.type===m.Syntax.Identifier){var O=t;this.scanner.isRestrictedWord(O.name)&&this.tolerateUnexpectedToken(n,l.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(O.name)&&this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var Y=n.value,ye=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(i),new o.AssignmentExpression(Y,t,ye)),this.context.firstCoverInitializedNameError=null}}return t},c.prototype.parseExpression=function(){var t=this.lookahead,i=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(i);this.lookahead.type!==2&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(t),new o.SequenceExpression(n))}return i},c.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.Messages.IllegalExportDeclaration),t=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.Messages.IllegalImportDeclaration),t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement();break}else t=this.parseStatement();return t},c.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var i=[];!this.match("}");)i.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new o.BlockStatement(i))},c.prototype.parseLexicalBinding=function(t,i){var n=this.createNode(),a=[],x=this.parsePattern(a,t);this.context.strict&&x.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(x.name)&&this.tolerateError(l.Messages.StrictVarName);var E=null;return t==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),E=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(l.Messages.DeclarationMissingInitializer,"const")):(!i.inFor&&x.type!==m.Syntax.Identifier||this.match("="))&&(this.expect("="),E=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(x,E))},c.prototype.parseBindingList=function(t,i){for(var n=[this.parseLexicalBinding(t,i)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(t,i));return n},c.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var i=this.scanner.lex();return this.scanner.restoreState(t),i.type===3||i.type===7&&i.value==="["||i.type===7&&i.value==="{"||i.type===4&&i.value==="let"||i.type===4&&i.value==="yield"},c.prototype.parseLexicalDeclaration=function(t){var i=this.createNode(),n=this.nextToken().value;r.assert(n==="let"||n==="const","Lexical declaration must be either let or const");var a=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(i,new o.VariableDeclaration(a,n))},c.prototype.parseBindingRestElement=function(t,i){var n=this.createNode();this.expect("...");var a=this.parsePattern(t,i);return this.finalize(n,new o.RestElement(a))},c.prototype.parseArrayPattern=function(t,i){var n=this.createNode();this.expect("[");for(var a=[];!this.match("]");)if(this.match(","))this.nextToken(),a.push(null);else{if(this.match("...")){a.push(this.parseBindingRestElement(t,i));break}else a.push(this.parsePatternWithDefault(t,i));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(a))},c.prototype.parsePropertyPattern=function(t,i){var n=this.createNode(),a=!1,x=!1,E=!1,C,y;if(this.lookahead.type===3){var S=this.lookahead;C=this.parseVariableIdentifier();var w=this.finalize(n,new o.Identifier(S.value));if(this.match("=")){t.push(S),x=!0,this.nextToken();var b=this.parseAssignmentExpression();y=this.finalize(this.startNode(S),new o.AssignmentPattern(w,b))}else this.match(":")?(this.expect(":"),y=this.parsePatternWithDefault(t,i)):(t.push(S),x=!0,y=w)}else a=this.match("["),C=this.parseObjectPropertyKey(),this.expect(":"),y=this.parsePatternWithDefault(t,i);return this.finalize(n,new o.Property("init",C,a,y,E,x))},c.prototype.parseObjectPattern=function(t,i){var n=this.createNode(),a=[];for(this.expect("{");!this.match("}");)a.push(this.parsePropertyPattern(t,i)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(a))},c.prototype.parsePattern=function(t,i){var n;return this.match("[")?n=this.parseArrayPattern(t,i):this.match("{")?n=this.parseObjectPattern(t,i):(this.matchKeyword("let")&&(i==="const"||i==="let")&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.LetInLexicalBinding),t.push(this.lookahead),n=this.parseVariableIdentifier(i)),n},c.prototype.parsePatternWithDefault=function(t,i){var n=this.lookahead,a=this.parsePattern(t,i);if(this.match("=")){this.nextToken();var x=this.context.allowYield;this.context.allowYield=!0;var E=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=x,a=this.finalize(this.startNode(n),new o.AssignmentPattern(a,E))}return a},c.prototype.parseVariableIdentifier=function(t){var i=this.createNode(),n=this.nextToken();return n.type===4&&n.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):n.type!==3?this.context.strict&&n.type===4&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord):(this.context.strict||n.value!=="let"||t!=="var")&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&n.type===3&&n.value==="await"&&this.tolerateUnexpectedToken(n),this.finalize(i,new o.Identifier(n.value))},c.prototype.parseVariableDeclaration=function(t){var i=this.createNode(),n=[],a=this.parsePattern(n,"var");this.context.strict&&a.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(l.Messages.StrictVarName);var x=null;return this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):a.type!==m.Syntax.Identifier&&!t.inFor&&this.expect("="),this.finalize(i,new o.VariableDeclarator(a,x))},c.prototype.parseVariableDeclarationList=function(t){var i={inFor:t.inFor},n=[];for(n.push(this.parseVariableDeclaration(i));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(i));return n},c.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var i=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(i,"var"))},c.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new o.EmptyStatement)},c.prototype.parseExpressionStatement=function(){var t=this.createNode(),i=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ExpressionStatement(i))},c.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(l.Messages.StrictFunction),this.parseStatement()},c.prototype.parseIfStatement=function(){var t=this.createNode(),i,n=null;this.expectKeyword("if"),this.expect("(");var a=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),i=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(a,i,n))},c.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var i=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=i,this.expectKeyword("while"),this.expect("(");var a=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new o.DoWhileStatement(n,a))},c.prototype.parseWhileStatement=function(){var t=this.createNode(),i;this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var a=this.context.inIteration;this.context.inIteration=!0,i=this.parseStatement(),this.context.inIteration=a}return this.finalize(t,new o.WhileStatement(n,i))},c.prototype.parseForStatement=function(){var t=null,i=null,n=null,a=!0,x,E,C=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){t=this.createNode(),this.nextToken();var y=this.context.allowIn;this.context.allowIn=!1;var S=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=y,S.length===1&&this.matchKeyword("in")){var w=S[0];w.init&&(w.id.type===m.Syntax.ArrayPattern||w.id.type===m.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(l.Messages.ForInOfLoopInitializer,"for-in"),t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.nextToken(),x=t,E=this.parseExpression(),t=null}else S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.nextToken(),x=t,E=this.parseAssignmentExpression(),t=null,a=!1):(t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){t=this.createNode();var b=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")t=this.finalize(t,new o.Identifier(b)),this.nextToken(),x=t,E=this.parseExpression(),t=null;else{var y=this.context.allowIn;this.context.allowIn=!1;var S=this.parseBindingList(b,{inFor:!0});this.context.allowIn=y,S.length===1&&S[0].init===null&&this.matchKeyword("in")?(t=this.finalize(t,new o.VariableDeclaration(S,b)),this.nextToken(),x=t,E=this.parseExpression(),t=null):S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(t=this.finalize(t,new o.VariableDeclaration(S,b)),this.nextToken(),x=t,E=this.parseAssignmentExpression(),t=null,a=!1):(this.consumeSemicolon(),t=this.finalize(t,new o.VariableDeclaration(S,b)))}}else{var B=this.lookahead,y=this.context.allowIn;if(this.context.allowIn=!1,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=y,this.matchKeyword("in"))(!this.context.isAssignmentTarget||t.type===m.Syntax.AssignmentExpression)&&this.tolerateError(l.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(t),x=t,E=this.parseExpression(),t=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||t.type===m.Syntax.AssignmentExpression)&&this.tolerateError(l.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(t),x=t,E=this.parseAssignmentExpression(),t=null,a=!1;else{if(this.match(",")){for(var T=[t];this.match(",");)this.nextToken(),T.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(B),new o.SequenceExpression(T))}this.expect(";")}}typeof x>"u"&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(n=this.parseExpression()));var N;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),N=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var O=this.context.inIteration;this.context.inIteration=!0,N=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=O}return typeof x>"u"?this.finalize(C,new o.ForStatement(t,i,n,N)):a?this.finalize(C,new o.ForInStatement(x,E,N)):this.finalize(C,new o.ForOfStatement(x,E,N))},c.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var i=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();i=n;var a="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,a)||this.throwError(l.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),i===null&&!this.context.inIteration&&this.throwError(l.Messages.IllegalContinue),this.finalize(t,new o.ContinueStatement(i))},c.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var i=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),a="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,a)||this.throwError(l.Messages.UnknownLabel,n.name),i=n}return this.consumeSemicolon(),i===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(l.Messages.IllegalBreak),this.finalize(t,new o.BreakStatement(i))},c.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(l.Messages.IllegalReturn);var t=this.createNode();this.expectKeyword("return");var i=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,n=i?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(t,new o.ReturnStatement(n))},c.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(l.Messages.StrictModeWith);var t=this.createNode(),i;this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),i=this.parseStatement()),this.finalize(t,new o.WithStatement(n,i))},c.prototype.parseSwitchCase=function(){var t=this.createNode(),i;this.matchKeyword("default")?(this.nextToken(),i=null):(this.expectKeyword("case"),i=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(i,n))},c.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var i=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var a=[],x=!1;for(this.expect("{");!this.match("}");){var E=this.parseSwitchCase();E.test===null&&(x&&this.throwError(l.Messages.MultipleDefaultsInSwitch),x=!0),a.push(E)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new o.SwitchStatement(i,a))},c.prototype.parseLabelledStatement=function(){var t=this.createNode(),i=this.parseExpression(),n;if(i.type===m.Syntax.Identifier&&this.match(":")){this.nextToken();var a=i,x="$"+a.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,x)&&this.throwError(l.Messages.Redeclaration,"Label",a.name),this.context.labelSet[x]=!0;var E=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),E=this.parseClassDeclaration();else if(this.matchKeyword("function")){var C=this.lookahead,y=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(C,l.Messages.StrictFunction):y.generator&&this.tolerateUnexpectedToken(C,l.Messages.GeneratorInLegacyContext),E=y}else E=this.parseStatement();delete this.context.labelSet[x],n=new o.LabeledStatement(a,E)}else this.consumeSemicolon(),n=new o.ExpressionStatement(i);return this.finalize(t,n)},c.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(l.Messages.NewlineAfterThrow);var i=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ThrowStatement(i))},c.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var i=[],n=this.parsePattern(i),a={},x=0;x0&&this.tolerateError(l.Messages.BadGetterArity);var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.parseSetterMethod=function(){var t=this.createNode(),i=!1,n=this.context.allowYield;this.context.allowYield=!i;var a=this.parseFormalParameters();a.params.length!==1?this.tolerateError(l.Messages.BadSetterArity):a.params[0]instanceof o.RestElement&&this.tolerateError(l.Messages.BadSetterRestParameter);var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.parseGeneratorMethod=function(){var t=this.createNode(),i=!0,n=this.context.allowYield;this.context.allowYield=!0;var a=this.parseFormalParameters();this.context.allowYield=!1;var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.isStartOfExpression=function(){var t=!0,i=this.lookahead.value;switch(this.lookahead.type){case 7:t=i==="["||i==="("||i==="{"||i==="+"||i==="-"||i==="!"||i==="~"||i==="++"||i==="--"||i==="/"||i==="/=";break;case 4:t=i==="class"||i==="delete"||i==="function"||i==="let"||i==="new"||i==="super"||i==="this"||i==="typeof"||i==="void"||i==="yield";break;default:break}return t},c.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var i=null,n=!1;if(!this.hasLineTerminator){var a=this.context.allowYield;this.context.allowYield=!1,n=this.match("*"),n?(this.nextToken(),i=this.parseAssignmentExpression()):this.isStartOfExpression()&&(i=this.parseAssignmentExpression()),this.context.allowYield=a}return this.finalize(t,new o.YieldExpression(i,n))},c.prototype.parseClassElement=function(t){var i=this.lookahead,n=this.createNode(),a="",x=null,E=null,C=!1,y=!1,S=!1,w=!1;if(this.match("*"))this.nextToken();else{C=this.match("["),x=this.parseObjectPropertyKey();var b=x;if(b.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(i=this.lookahead,S=!0,C=this.match("["),this.match("*")?this.nextToken():x=this.parseObjectPropertyKey()),i.type===3&&!this.hasLineTerminator&&i.value==="async"){var B=this.lookahead.value;B!==":"&&B!=="("&&B!=="*"&&(w=!0,i=this.lookahead,x=this.parseObjectPropertyKey(),i.type===3&&i.value==="constructor"&&this.tolerateUnexpectedToken(i,l.Messages.ConstructorIsAsync))}}var T=this.qualifiedPropertyName(this.lookahead);return i.type===3?i.value==="get"&&T?(a="get",C=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,E=this.parseGetterMethod()):i.value==="set"&&T&&(a="set",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseSetterMethod()):i.type===7&&i.value==="*"&&T&&(a="init",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseGeneratorMethod(),y=!0),!a&&x&&this.match("(")&&(a="init",E=w?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),y=!0),a||this.throwUnexpectedToken(this.lookahead),a==="init"&&(a="method"),C||(S&&this.isPropertyKey(x,"prototype")&&this.throwUnexpectedToken(i,l.Messages.StaticPrototype),!S&&this.isPropertyKey(x,"constructor")&&((a!=="method"||!y||E&&E.generator)&&this.throwUnexpectedToken(i,l.Messages.ConstructorSpecialMethod),t.value?this.throwUnexpectedToken(i,l.Messages.DuplicateConstructor):t.value=!0,a="constructor")),this.finalize(n,new o.MethodDefinition(x,C,E,a,S))},c.prototype.parseClassElementList=function(){var t=[],i={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(i));return this.expect("}"),t},c.prototype.parseClassBody=function(){var t=this.createNode(),i=this.parseClassElementList();return this.finalize(t,new o.ClassBody(i))},c.prototype.parseClassDeclaration=function(t){var i=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var a=t&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),x=null;this.matchKeyword("extends")&&(this.nextToken(),x=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var E=this.parseClassBody();return this.context.strict=n,this.finalize(i,new o.ClassDeclaration(a,x,E))},c.prototype.parseClassExpression=function(){var t=this.createNode(),i=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=this.lookahead.type===3?this.parseVariableIdentifier():null,a=null;this.matchKeyword("extends")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=i,this.finalize(t,new o.ClassExpression(n,a,x))},c.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),i=this.parseDirectivePrologues();this.lookahead.type!==2;)i.push(this.parseStatementListItem());return this.finalize(t,new o.Module(i))},c.prototype.parseScript=function(){for(var t=this.createNode(),i=this.parseDirectivePrologues();this.lookahead.type!==2;)i.push(this.parseStatementListItem());return this.finalize(t,new o.Script(i))},c.prototype.parseModuleSpecifier=function(){var t=this.createNode();this.lookahead.type!==8&&this.throwError(l.Messages.InvalidModuleSpecifier);var i=this.nextToken(),n=this.getTokenRaw(i);return this.finalize(t,new o.Literal(i.value,n))},c.prototype.parseImportSpecifier=function(){var t=this.createNode(),i,n;return this.lookahead.type===3?(i=this.parseVariableIdentifier(),n=i,this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseVariableIdentifier())):(i=this.parseIdentifierName(),n=i,this.matchContextualKeyword("as")?(this.nextToken(),n=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(t,new o.ImportSpecifier(n,i))},c.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},c.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),i=this.parseIdentifierName();return this.finalize(t,new o.ImportDefaultSpecifier(i))},c.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(l.Messages.NoAsAfterImportNamespace),this.nextToken();var i=this.parseIdentifierName();return this.finalize(t,new o.ImportNamespaceSpecifier(i))},c.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalImportDeclaration);var t=this.createNode();this.expectKeyword("import");var i,n=[];if(this.lookahead.type===8)i=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}this.nextToken(),i=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,i))},c.prototype.parseExportSpecifier=function(){var t=this.createNode(),i=this.parseIdentifierName(),n=i;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(t,new o.ExportSpecifier(i,n))},c.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalExportDeclaration);var t=this.createNode();this.expectKeyword("export");var i;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){var n=this.parseClassDeclaration(!0);i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){var n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(l.Messages.UnexpectedToken,this.lookahead.value);var n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}this.nextToken();var x=this.parseModuleSpecifier();this.consumeSemicolon(),i=this.finalize(t,new o.ExportAllDeclaration(x))}else if(this.lookahead.type===4){var n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}i=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){var n=this.parseFunctionDeclaration();i=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else{var E=[],C=null,y=!1;for(this.expect("{");!this.match("}");)y=y||this.matchKeyword("default"),E.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),C=this.parseModuleSpecifier(),this.consumeSemicolon();else if(y){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}else this.consumeSemicolon();i=this.finalize(t,new o.ExportNamedDeclaration(null,E,C))}return i},c}();e.Parser=d},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function s(r,u){if(!r)throw new Error("ASSERT: "+u)}e.assert=s},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function r(){this.errors=[],this.tolerant=!1}return r.prototype.recordError=function(u){this.errors.push(u)},r.prototype.tolerate=function(u){if(this.tolerant)this.recordError(u);else throw u},r.prototype.constructError=function(u,l){var o=new Error(u);try{throw o}catch(D){Object.create&&Object.defineProperty&&(o=Object.create(D),Object.defineProperty(o,"column",{value:l}))}return o},r.prototype.createError=function(u,l,o,D){var m="Line "+l+": "+D,f=this.constructError(m,o);return f.index=u,f.lineNumber=l,f.description=D,f},r.prototype.throwError=function(u,l,o,D){throw this.createError(u,l,o,D)},r.prototype.tolerateError=function(u,l,o,D){var m=this.createError(u,l,o,D);if(this.tolerant)this.recordError(m);else throw m},r}();e.ErrorHandler=s},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(9),u=s(4),l=s(11);function o(f){return"0123456789abcdef".indexOf(f.toLowerCase())}function D(f){return"01234567".indexOf(f)}var m=function(){function f(p,d){this.source=p,this.errorHandler=d,this.trackComment=!1,this.isModule=!1,this.length=p.length,this.index=0,this.lineNumber=p.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return f.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},f.prototype.restoreState=function(p){this.index=p.index,this.lineNumber=p.lineNumber,this.lineStart=p.lineStart},f.prototype.eof=function(){return this.index>=this.length},f.prototype.throwUnexpectedToken=function(p){return p===void 0&&(p=l.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},f.prototype.tolerateUnexpectedToken=function(p){p===void 0&&(p=l.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},f.prototype.skipSingleLineComment=function(p){var d=[],c,t;for(this.trackComment&&(d=[],c=this.index-p,t={start:{line:this.lineNumber,column:this.index-this.lineStart-p},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,u.Character.isLineTerminator(i)){if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart-1};var n={multiLine:!1,slice:[c+p,this.index-1],range:[c,this.index-1],loc:t};d.push(n)}return i===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d}}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!1,slice:[c+p,this.index],range:[c,this.index],loc:t};d.push(n)}return d},f.prototype.skipMultiLineComment=function(){var p=[],d,c;for(this.trackComment&&(p=[],d=this.index-2,c={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var t=this.source.charCodeAt(this.index);if(u.Character.isLineTerminator(t))t===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(t===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){c.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[d+2,this.index-2],range:[d,this.index],loc:c};p.push(i)}return p}++this.index}else++this.index}if(this.trackComment){c.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[d+2,this.index],range:[d,this.index],loc:c};p.push(i)}return this.tolerateUnexpectedToken(),p},f.prototype.scanComments=function(){var p;this.trackComment&&(p=[]);for(var d=this.index===0;!this.eof();){var c=this.source.charCodeAt(this.index);if(u.Character.isWhiteSpace(c))++this.index;else if(u.Character.isLineTerminator(c))++this.index,c===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d=!0;else if(c===47)if(c=this.source.charCodeAt(this.index+1),c===47){this.index+=2;var t=this.skipSingleLineComment(2);this.trackComment&&(p=p.concat(t)),d=!0}else if(c===42){this.index+=2;var t=this.skipMultiLineComment();this.trackComment&&(p=p.concat(t))}else break;else if(d&&c===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var t=this.skipSingleLineComment(3);this.trackComment&&(p=p.concat(t))}else break;else if(c===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var t=this.skipSingleLineComment(4);this.trackComment&&(p=p.concat(t))}else break;else break}return p},f.prototype.isFutureReservedWord=function(p){switch(p){case"enum":case"export":case"import":case"super":return!0;default:return!1}},f.prototype.isStrictModeReservedWord=function(p){switch(p){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},f.prototype.isRestrictedWord=function(p){return p==="eval"||p==="arguments"},f.prototype.isKeyword=function(p){switch(p.length){case 2:return p==="if"||p==="in"||p==="do";case 3:return p==="var"||p==="for"||p==="new"||p==="try"||p==="let";case 4:return p==="this"||p==="else"||p==="case"||p==="void"||p==="with"||p==="enum";case 5:return p==="while"||p==="break"||p==="catch"||p==="throw"||p==="const"||p==="yield"||p==="class"||p==="super";case 6:return p==="return"||p==="typeof"||p==="delete"||p==="switch"||p==="export"||p==="import";case 7:return p==="default"||p==="finally"||p==="extends";case 8:return p==="function"||p==="continue"||p==="debugger";case 10:return p==="instanceof";default:return!1}},f.prototype.codePointAt=function(p){var d=this.source.charCodeAt(p);if(d>=55296&&d<=56319){var c=this.source.charCodeAt(p+1);if(c>=56320&&c<=57343){var t=d;d=(t-55296)*1024+c-56320+65536}}return d},f.prototype.scanHexEscape=function(p){for(var d=p==="u"?4:2,c=0,t=0;t1114111||p!=="}")&&this.throwUnexpectedToken(),u.Character.fromCodePoint(d)},f.prototype.getIdentifier=function(){for(var p=this.index++;!this.eof();){var d=this.source.charCodeAt(this.index);if(d===92)return this.index=p,this.getComplexIdentifier();if(d>=55296&&d<57343)return this.index=p,this.getComplexIdentifier();if(u.Character.isIdentifierPart(d))++this.index;else break}return this.source.slice(p,this.index)},f.prototype.getComplexIdentifier=function(){var p=this.codePointAt(this.index),d=u.Character.fromCodePoint(p);this.index+=d.length;var c;for(p===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,c=this.scanUnicodeCodePointEscape()):(c=this.scanHexEscape("u"),(c===null||c==="\\"||!u.Character.isIdentifierStart(c.charCodeAt(0)))&&this.throwUnexpectedToken()),d=c);!this.eof()&&(p=this.codePointAt(this.index),!!u.Character.isIdentifierPart(p));)c=u.Character.fromCodePoint(p),d+=c,this.index+=c.length,p===92&&(d=d.substr(0,d.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,c=this.scanUnicodeCodePointEscape()):(c=this.scanHexEscape("u"),(c===null||c==="\\"||!u.Character.isIdentifierPart(c.charCodeAt(0)))&&this.throwUnexpectedToken()),d+=c);return d},f.prototype.octalToDecimal=function(p){var d=p!=="0",c=D(p);return!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=!0,c=c*8+D(this.source[this.index++]),"0123".indexOf(p)>=0&&!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(c=c*8+D(this.source[this.index++]))),{code:c,octal:d}},f.prototype.scanIdentifier=function(){var p,d=this.index,c=this.source.charCodeAt(d)===92?this.getComplexIdentifier():this.getIdentifier();if(c.length===1?p=3:this.isKeyword(c)?p=4:c==="null"?p=5:c==="true"||c==="false"?p=1:p=3,p!==3&&d+c.length!==this.index){var t=this.index;this.index=d,this.tolerateUnexpectedToken(l.Messages.InvalidEscapedReservedWord),this.index=t}return{type:p,value:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},f.prototype.scanPunctuator=function(){var p=this.index,d=this.source[this.index];switch(d){case"(":case"{":d==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,d="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:d=this.source.substr(this.index,4),d===">>>="?this.index+=4:(d=d.substr(0,3),d==="==="||d==="!=="||d===">>>"||d==="<<="||d===">>="||d==="**="?this.index+=3:(d=d.substr(0,2),d==="&&"||d==="||"||d==="=="||d==="!="||d==="+="||d==="-="||d==="*="||d==="/="||d==="++"||d==="--"||d==="<<"||d===">>"||d==="&="||d==="|="||d==="^="||d==="%="||d==="<="||d===">="||d==="=>"||d==="**"?this.index+=2:(d=this.source[this.index],"<>=!+-*%&|^/".indexOf(d)>=0&&++this.index)))}return this.index===p&&this.throwUnexpectedToken(),{type:7,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanHexLiteral=function(p){for(var d="";!this.eof()&&u.Character.isHexDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),u.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+d,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanBinaryLiteral=function(p){for(var d="",c;!this.eof()&&(c=this.source[this.index],!(c!=="0"&&c!=="1"));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),this.eof()||(c=this.source.charCodeAt(this.index),(u.Character.isIdentifierStart(c)||u.Character.isDecimalDigit(c))&&this.throwUnexpectedToken()),{type:6,value:parseInt(d,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanOctalLiteral=function(p,d){var c="",t=!1;for(u.Character.isOctalDigit(p.charCodeAt(0))?(t=!0,c="0"+this.source[this.index++]):++this.index;!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];return!t&&c.length===0&&this.throwUnexpectedToken(),(u.Character.isIdentifierStart(this.source.charCodeAt(this.index))||u.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(c,8),octal:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},f.prototype.isImplicitOctalLiteral=function(){for(var p=this.index+1;p=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];s.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],h.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(h.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!h.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t=55296&&p<57343&&h.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(10),h=r(12),l=r(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new h.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p{function is(u){return Array.isArray?Array.isArray(u):de(u)==="[object Array]"}I.isArray=is;function rs(u){return typeof u=="boolean"}I.isBoolean=rs;function ss(u){return u===null}I.isNull=ss;function ns(u){return u==null}I.isNullOrUndefined=ns;function as(u){return typeof u=="number"}I.isNumber=as;function os(u){return typeof u=="string"}I.isString=os;function us(u){return typeof u=="symbol"}I.isSymbol=us;function hs(u){return u===void 0}I.isUndefined=hs;function ls(u){return de(u)==="[object RegExp]"}I.isRegExp=ls;function cs(u){return typeof u=="object"&&u!==null}I.isObject=cs;function ps(u){return de(u)==="[object Date]"}I.isDate=ps;function fs(u){return de(u)==="[object Error]"||u instanceof Error}I.isError=fs;function ms(u){return typeof u=="function"}I.isFunction=ms;function ds(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||typeof u=="symbol"||typeof u>"u"}I.isPrimitive=ds;I.isBuffer=require("buffer").Buffer.isBuffer;function de(u){return Object.prototype.toString.call(u)}});var Xt=_((Hn,Rt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=u=>u<1e5?u<100?u<10?0:1:u<1e4?u<1e3?2:3:4:u<1e7?u<1e6?5:6:u<1e9?u<1e8?7:8:9;function Pt(u,e){if(u===e)return 0;if(~~u===u&&~~e===e){if(u===0||e===0)return u=0)return-1;if(u>=0)return 1;u=-u,e=-e}let h=It(u),l=It(e),o=0;return hl&&(e*=_t[h-l-1],u/=10,o=1),u===e?o:u=32;)e|=u&1,u>>=1;return u+e}function Ot(u,e,r,s){let h=e+1;if(h===r)return 1;if(s(u[h++],u[e])<0){for(;h=0;)h++;return h-e}function Mt(u,e,r){for(r--;e>>1;h(l,u[p])<0?m=p:D=p+1}let f=s-D;switch(f){case 3:u[D+3]=u[D+2],F[D+3]=F[D+2];case 2:u[D+2]=u[D+1],F[D+2]=F[D+1];case 1:u[D+1]=u[D],F[D+1]=F[D];break;default:for(;f>0;)u[D+f]=u[D+f-1],F[D+f]=F[D+f-1],f--}u[D]=l,F[D]=o}}function Je(u,e,r,s,h,l){let o=0,D=0,m=1;if(l(u,e[r+h])>0){for(D=s-h;m0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=h,m+=h}else{for(D=h+1;mD&&(m=D);let f=o;o=h-m,m=h-f}for(o++;o>>1);l(u,e[r+f])>0?o=f+1:m=f}return m}function Ue(u,e,r,s,h,l){let o=0,D=0,m=1;if(l(u,e[r+h])<0){for(D=h+1;mD&&(m=D);let f=o;o=h-m,m=h-f}else{for(D=s-h;m=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=h,m+=h}for(o++;o>>1);l(u,e[r+f])<0?m=f:o=f+1}return m}var ze=class{constructor(e,r){this.array=e,this.compare=r;let{length:s}=e;this.length=s,this.minGallop=7,this.tmpStorageLength=s<2*256?s>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=s<120?5:s<1542?10:s<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,r){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=r,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),r===1){for(f=0;f=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--r===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--h===1){E=!0;break}while((a|x)=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(r===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--h===1){E=!0;break}if(x=h-Je(o[p],D,0,h,h-1,l),x!==0){for(c-=x,d-=x,h-=x,i=c+1,t=d+1,f=0;f=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),h===1){for(c-=r,p-=r,i=c+1,t=p+1,f=r-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(h===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(h-1),f=0;ff&&(p=f),Lt(u,r,r+p,r+D,e),D=p}m.pushRun(r,D),m.mergeRuns(),o-=D,r+=D}while(o!==0);return m.forceMergeRuns(),F}Rt.exports={sort:Ds}});var Ut=_((jn,Jt)=>{"use strict";var Es=Object.prototype.hasOwnProperty;Jt.exports=(u,e)=>Es.call(u,e)});var se=_((Vn,Qt)=>{var Ve=Ut(),{isObject:zt,isArray:gs,isString:vs,isNumber:Cs}=xe(),Ke="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",As="[",ys="]",Ss="{",Fs="}",ws=",",bs="",ks="-",$e=[Ke,jt,Vt,Kt,$t],Bs=[Ke,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(u,e)=>Symbol.for(u+qt+e),De=(u,e,r)=>Object.defineProperty(u,e,{value:r,writable:!0,configurable:!0}),je=(u,e,r,s,h,l)=>{let o=re(h,s);if(!Ve(e,o))return;let D=r===s?o:re(h,r);De(u,D,e[o]),l&&delete e[o]},Yt=(u,e,r,s,h)=>{$e.forEach(l=>{je(u,e,r,s,l,h)})},Ts=(u,e,r)=>{e!==r&&$e.forEach(s=>{let h=re(s,r);if(!Ve(u,h)){je(u,u,r,e,s,!0);return}let l=u[h];delete u[h],je(u,u,r,e,s,!0),De(u,re(s,e),l)})},He=(u,e)=>{Bs.forEach(r=>{let s=e[r];s&&De(u,r,s)})},Ns=(u,e,r)=>(r.forEach(s=>{!vs(s)&&!Cs(s)||Ve(e,s)&&(u[s]=e[s],Yt(u,e,s,s))}),u);Qt.exports={SYMBOL_PREFIXES:$e,PREFIX_BEFORE:Ke,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:As,BRACKET_CLOSE:ys,CURLY_BRACKET_OPEN:Ss,CURLY_BRACKET_CLOSE:Fs,COLON:qt,COMMA:ws,MINUS:ks,EMPTY:bs,UNDEFINED:Ht,symbol:re,define:De,copy_comments:Yt,swap_comments:Ts,assign_non_prop_comments:He,assign(u,e,r){if(!zt(u))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return u;if(r===Ht)r=Object.keys(e),He(u,e);else if(gs(r))r.length===0&&He(u,e);else throw new TypeError("keys must be array or undefined");return Ns(u,e,r)}}});var Ge=_((Kn,ri)=>{var{isArray:_s}=xe(),{sort:Is}=Xt(),{SYMBOL_PREFIXES:Ps,UNDEFINED:Zt,symbol:Os,copy_comments:Ms,swap_comments:ii}=se(),Ls=u=>{let{length:e}=u,r=0,s=e/2;for(;r{Ms(u,e,r+s,r,h)},Y=(u,e,r,s,h,l)=>{if(h>0){let D=s;for(;D-- >0;)ei(u,e,r+D,h,l);return}let o=0;for(;o{Ps.forEach(r=>{let s=Os(r,e);delete u[s]})},Rs=(u,e)=>{let r=e;for(;r in u;)r=u[r];return r},Q=class extends Array{splice(...e){let{length:r}=this,s=super.splice(...e),[h,l,...o]=e;h<0&&(h+=r),arguments.length===1?l=r-h:l=Math.min(r-h,l);let{length:D}=o,m=D-l,f=h+l,p=r-f;return Y(this,this,f,p,m,!0),s}slice(...e){let{length:r}=this,s=super.slice(...e);if(!s.length)return new Q;let[h,l]=e;return l===Zt?l=r:l<0&&(l+=r),h<0?h+=r:h===Zt&&(h=0),Y(s,this,h,l-h,-h),s}unshift(...e){let{length:r}=this,s=super.unshift(...e),{length:h}=e;return h>0&&Y(this,this,0,r,h,!0),s}shift(){let e=super.shift(),{length:r}=this;return ti(this,0),Y(this,this,1,r,-1,!0),e}reverse(){return super.reverse(),Ls(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:r}=this,s=super.concat(...e);return e.length&&(Y(s,this,0,this.length,0),e.forEach(h=>{let l=r;r+=_s(h)?h.length:1,h instanceof Q&&Y(s,h,0,h.length,l)})),s}sort(...e){let r=Is(this,...e.slice(0,1)),s=Object.create(null);return r.forEach((h,l)=>{if(h===l)return;let o=Rs(s,h);o!==l&&(s[l]=o,ii(this,l,o))}),this}};ri.exports={CommentArray:Q}});var vi=_(($n,gi)=>{var Xs=Nt(),{CommentArray:Js}=Ge(),{PREFIX_BEFORE:ge,PREFIX_AFTER_PROP:Us,PREFIX_AFTER_COLON:zs,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:qe,PREFIX_BEFORE_ALL:Hs,PREFIX_AFTER_ALL:js,BRACKET_OPEN:Vs,BRACKET_CLOSE:si,CURLY_BRACKET_OPEN:Ks,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$s,UNDEFINED:Ae,define:Ye,assign_non_prop_comments:Gs}=se(),li=u=>Xs.tokenize(u,{comment:!0,loc:!0}),Qe=[],V=null,U=null,Ze=[],K,ci=!1,pi=!1,ne=null,ae=null,P=null,fi,ve=null,mi=()=>{Ze.length=Qe.length=0,ae=null,K=Ae},Ws=()=>{mi(),ne.length=0,U=V=ne=ae=P=ve=null},et=u=>Symbol.for(K!==Ae?u+ui+K:u),tt=(u,e)=>ve?ve(u,e):e,di=()=>{let u=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(u,P.loc.start),u},xi=()=>{let u=new SyntaxError("Unexpected end of JSON input");throw Object.assign(u,ae?ae.loc.end:{line:1,column:0}),u},X=()=>{let u=ne[++fi];pi=P&&u&&P.loc.end.line===u.loc.start.line||!1,ae=P,P=u},We=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),G=u=>We()===u,Ee=u=>{G(u)||di()},it=u=>{Qe.push(V),V=u},rt=()=>{V=Qe.pop()},Di=()=>{if(!U)return;let u=[];for(let r of U)if(r.inline)u.push(r);else break;let{length:e}=u;e&&(e===U.length?U=null:U.splice(0,e),Ye(V,et(qe),u))},j=u=>{U&&(Ye(V,et(u),U),U=null)},z=u=>{let e=[];for(;P&&(G("LineComment")||G("BlockComment"));){let r={...P,inline:pi};e.push(r),X()}if(!ci&&e.length){if(u){Ye(V,et(u),e);return}U=e}},Ce=(u,e)=>{e&&Ze.push(K),K=u},Ei=()=>{K=Ze.pop()},qs=()=>{let u={};it(u),Ce(Ae,!0);let e=!1,r;for(z();!G(ni)&&!(e&&(j(oi),Ee(hi),X(),z(),Di(),G(ni)));)e=!0,Ee("String"),r=JSON.parse(P.value),Ce(r),j(ge),X(),z(Us),Ee(ui),X(),z(zs),u[r]=tt(r,st()),z();return e&&j(qe),X(),K=void 0,e||j(ge),rt(),Ei(),u},Ys=()=>{let u=new Js;it(u),Ce(Ae,!0);let e=!1,r=0;for(z();!G(si)&&!(e&&(j(oi),Ee(hi),X(),z(),Di(),G(si)));)e=!0,Ce(r),j(ge),u[r]=tt(r,st()),r++,z();return e&&j(qe),X(),K=void 0,e||j(ge),rt(),Ei(),u};function st(){let u=We();if(u===Ks)return X(),qs();if(u===Vs)return X(),Ys();let e=$s;u===ai&&(X(),u=We(),e=ai);let r;switch(u){case"String":case"Boolean":case"Null":case"Numeric":return r=P.value,X(),JSON.parse(e+r);default:}}var Qs=u=>Object(u)===u,Zs=(u,e,r)=>{mi(),ne=li(u),ve=e,ci=r,ne.length||xi(),fi=-1,X(),it({}),z(Hs);let s=st();return z(js),P&&di(),!r&&s!==null&&(Qs(s)||(s=new Object(s)),Gs(s,V)),rt(),s=tt("",s),Ws(),s};gi.exports={parse:Zs,tokenize:li}});var Ai=_((Gn,Ci)=>{"use strict";var H="",nt;Ci.exports=en;function en(u,e){if(typeof u!="string")throw new TypeError("expected a string");if(e===1)return u;if(e===2)return u+u;var r=u.length*e;if(nt!==u||typeof nt>"u")nt=u,H="";else if(H.length>=r)return H.substr(0,r);for(;r>H.length&&e>1;)e&1&&(H+=u),e>>=1,u+=u;return H+=u,H=H.substr(0,r),H}});var Ii=_((Wn,_i)=>{var{isArray:ut,isObject:yi,isFunction:ot,isNumber:tn,isString:rn}=xe(),sn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:ht,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:R,UNDEFINED:dn}=se(),at=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,lt=" ",W=` -`,wi="null",bi=u=>`${Si}:${u}`,xn=u=>`${an}:${u}`,Dn=u=>`${on}:${u}`,ki=u=>`${un}:${u}`,Bi=u=>`${ht}:${u}`,En={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},gn=u=>(at.lastIndex=0,at.test(u)?u.replace(at,e=>{let r=En[e];return typeof r=="string"?r:e}):u),Ti=u=>`"${gn(u)}"`,vn=(u,e)=>e?`//${u}`:`/*${u}*/`,L=(u,e,r,s)=>{let h=u[Symbol.for(e)];if(!h||!h.length)return R;let l=!1,o=h.reduce((D,{inline:m,type:f,value:p})=>{let d=m?lt:W+r;return l=f==="LineComment",D+d+vn(p,l)},R);return s||l?o+W+r:o},Z=null,ue=R,Cn=()=>{Z=null,ue=R},oe=(u,e,r)=>u?e?u+e.trim()+W+r:u.trimRight()+W+r:e?e.trimRight()+W+r:R,Ni=(u,e,r)=>{let s=L(e,Si,r+ue,!0);return oe(s,u,r)},An=(u,e)=>{let r=e+ue,{length:s}=u,h=R,l=R;for(let o=0;o{if(!u)return"null";let r=e+ue,s=R,h=R,l=!0,o=ut(Z)?Z:Object.keys(u),D=m=>{let f=ct(m,u,r);if(f===dn)return;l||(s+=Fi),l=!1;let p=oe(h,L(u,bi(m),r),r);s+=p||W+r,s+=Ti(m)+L(u,xn(m),r)+mn+L(u,Dn(m),r)+lt+f+L(u,ki(m),r),h=L(u,Bi(m),r)};return o.forEach(D),s+=oe(h,L(u,ht,r),r),pn+Ni(s,u,e)+fn};function ct(u,e,r){let s=e[u];switch(yi(s)&&ot(s.toJSON)&&(s=s.toJSON(u)),ot(Z)&&(s=Z.call(e,u,s)),typeof s){case"string":return Ti(s);case"number":return Number.isFinite(s)?String(s):wi;case"boolean":case"null":return String(s);case"object":return ut(s)?An(s,r):yn(s,r);default:}}var Sn=u=>rn(u)?u:tn(u)?sn(lt,u):R,{toString:Fn}=Object.prototype,wn=["[object Number]","[object String]","[object Boolean]"],bn=u=>{if(typeof u!="object")return!1;let e=Fn.call(u);return wn.includes(e)};_i.exports=(u,e,r)=>{let s=Sn(r);if(!s)return JSON.stringify(u,e);!ot(e)&&!ut(e)&&(e=null),Z=e,ue=s;let h=bn(u)?JSON.stringify(u):ct("",{"":u},R);return Cn(),yi(u)?L(u,nn,R).trimLeft()+h+L(u,hn,R).trimRight():h}});var Oi=_((qn,Pi)=>{var{parse:kn,tokenize:Bn}=vi(),Tn=Ii(),{CommentArray:Nn}=Ge(),{assign:_n}=se();Pi.exports={parse:kn,stringify:Tn,tokenize:Bn,CommentArray:Nn,assign:_n}});var pe=Dt(Tt());var le=Dt(Oi()),ce=require("fs/promises"),he=require("path");var In=new Set(["@hcengineering/prod","@hcengineering/pod-front","@hcengineering/pod-server","@hcengineering/pod-account"]);function Pn(u){return e=>!e.projectFolder.startsWith(u)}async function Mi(u,e){let r=(0,le.parse)((await(0,ce.readFile)((0,he.join)(u,e,"rush.json"))).toString()),s=(0,he.join)(u,"rush.json"),h=(0,he.join)(u,"rush_source.json"),l=(0,le.parse)((await(0,ce.readFile)(h)).toString()),o=r.projects.filter(f=>!In.has(f.packageName)),m=l.projects.filter(Pn(e));m.push(...o.map(f=>xt(dt({},f),{projectFolder:(0,he.join)(e,f.projectFolder),shouldPublish:!1}))),l.projects=m,await(0,ce.writeFile)(s,(0,le.stringify)(l,void 0,2))}async function Li(u,e){}console.info("Anticrm Platform Manager");pe.program.version("0.6.0");pe.program.command("rush-sync ").description("Synchronized rush.js files with platform.").action(async(u,e)=>{await Mi(process.cwd(),u)});pe.program.command("template-apply ").description("Create necessary startup packages").requiredOption("--root ","user password","platform").action(async(u,e)=>{await Li(process.cwd(),u)});pe.program.parse(process.argv); +`):p+=a}return d||this.throwUnexpectedToken(),t||this.curlyStack.pop(),{type:10,value:this.source.slice(c+1,this.index-n),cooked:p,head:t,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:c,end:this.index}},f.prototype.testRegExp=function(p,d){var c="\uFFFF",t=p,i=this;d.indexOf("u")>=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];r.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],u.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(u.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!u.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t=55296&&p<57343&&u.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(10),u=s(12),l=s(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new u.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p{function ir(h){return Array.isArray?Array.isArray(h):me(h)==="[object Array]"}I.isArray=ir;function sr(h){return typeof h=="boolean"}I.isBoolean=sr;function rr(h){return h===null}I.isNull=rr;function nr(h){return h==null}I.isNullOrUndefined=nr;function ar(h){return typeof h=="number"}I.isNumber=ar;function or(h){return typeof h=="string"}I.isString=or;function ur(h){return typeof h=="symbol"}I.isSymbol=ur;function hr(h){return h===void 0}I.isUndefined=hr;function lr(h){return me(h)==="[object RegExp]"}I.isRegExp=lr;function cr(h){return typeof h=="object"&&h!==null}I.isObject=cr;function pr(h){return me(h)==="[object Date]"}I.isDate=pr;function fr(h){return me(h)==="[object Error]"||h instanceof Error}I.isError=fr;function mr(h){return typeof h=="function"}I.isFunction=mr;function dr(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||typeof h=="symbol"||typeof h>"u"}I.isPrimitive=dr;I.isBuffer=require("buffer").Buffer.isBuffer;function me(h){return Object.prototype.toString.call(h)}});var Rt=_((Un,Xt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=h=>h<1e5?h<100?h<10?0:1:h<1e4?h<1e3?2:3:4:h<1e7?h<1e6?5:6:h<1e9?h<1e8?7:8:9;function Pt(h,e){if(h===e)return 0;if(~~h===h&&~~e===e){if(h===0||e===0)return h=0)return-1;if(h>=0)return 1;h=-h,e=-e}let u=It(h),l=It(e),o=0;return ul&&(e*=_t[u-l-1],h/=10,o=1),h===e?o:h=32;)e|=h&1,h>>=1;return h+e}function Ot(h,e,s,r){let u=e+1;if(u===s)return 1;if(r(h[u++],h[e])<0){for(;u=0;)u++;return u-e}function Mt(h,e,s){for(s--;e>>1;u(l,h[p])<0?m=p:D=p+1}let f=r-D;switch(f){case 3:h[D+3]=h[D+2],F[D+3]=F[D+2];case 2:h[D+2]=h[D+1],F[D+2]=F[D+1];case 1:h[D+1]=h[D],F[D+1]=F[D];break;default:for(;f>0;)h[D+f]=h[D+f-1],F[D+f]=F[D+f-1],f--}h[D]=l,F[D]=o}}function Ue(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])>0){for(D=r-u;m0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}else{for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}for(o++;o>>1);l(h,e[s+f])>0?o=f+1:m=f}return m}function ze(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])<0){for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}else{for(D=r-u;m=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}for(o++;o>>1);l(h,e[s+f])<0?m=f:o=f+1}return m}var He=class{constructor(e,s){this.array=e,this.compare=s;let{length:r}=e;this.length=r,this.minGallop=7,this.tmpStorageLength=r<2*256?r>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=r<120?5:r<1542?10:r<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,s){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=s,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),s===1){for(f=0;f=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--s===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--u===1){E=!0;break}while((a|x)=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(s===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--u===1){E=!0;break}if(x=u-Ue(o[p],D,0,u,u-1,l),x!==0){for(c-=x,d-=x,u-=x,i=c+1,t=d+1,f=0;f=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),u===1){for(c-=s,p-=s,i=c+1,t=p+1,f=s-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(u===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(u-1),f=0;ff&&(p=f),Lt(h,s,s+p,s+D,e),D=p}m.pushRun(s,D),m.mergeRuns(),o-=D,s+=D}while(o!==0);return m.forceMergeRuns(),F}Xt.exports={sort:Dr}});var Ut=_((zn,Jt)=>{"use strict";var Er=Object.prototype.hasOwnProperty;Jt.exports=(h,e)=>Er.call(h,e)});var ne=_((Hn,Qt)=>{var Ke=Ut(),{isObject:zt,isArray:gr,isString:vr,isNumber:Cr}=de(),$e="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",Ar="[",yr="]",Sr="{",Fr="}",wr=",",br="",kr="-",Ge=[$e,jt,Vt,Kt,$t],Br=[$e,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(h,e)=>Symbol.for(h+qt+e),xe=(h,e,s)=>Object.defineProperty(h,e,{value:s,writable:!0,configurable:!0}),Ve=(h,e,s,r,u,l)=>{let o=re(u,r);if(!Ke(e,o))return;let D=s===r?o:re(u,s);xe(h,D,e[o]),l&&delete e[o]},Yt=(h,e,s,r,u)=>{Ge.forEach(l=>{Ve(h,e,s,r,l,u)})},Tr=(h,e,s)=>{e!==s&&Ge.forEach(r=>{let u=re(r,s);if(!Ke(h,u)){Ve(h,h,s,e,r,!0);return}let l=h[u];delete h[u],Ve(h,h,s,e,r,!0),xe(h,re(r,e),l)})},je=(h,e)=>{Br.forEach(s=>{let r=e[s];r&&xe(h,s,r)})},Nr=(h,e,s)=>(s.forEach(r=>{!vr(r)&&!Cr(r)||Ke(e,r)&&(h[r]=e[r],Yt(h,e,r,r))}),h);Qt.exports={SYMBOL_PREFIXES:Ge,PREFIX_BEFORE:$e,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:Ar,BRACKET_CLOSE:yr,CURLY_BRACKET_OPEN:Sr,CURLY_BRACKET_CLOSE:Fr,COLON:qt,COMMA:wr,MINUS:kr,EMPTY:br,UNDEFINED:Ht,symbol:re,define:xe,copy_comments:Yt,swap_comments:Tr,assign_non_prop_comments:je,assign(h,e,s){if(!zt(h))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return h;if(s===Ht)s=Object.keys(e),je(h,e);else if(gr(s))s.length===0&&je(h,e);else throw new TypeError("keys must be array or undefined");return Nr(h,e,s)}}});var We=_((jn,si)=>{var{isArray:_r}=de(),{sort:Ir}=Rt(),{SYMBOL_PREFIXES:Pr,UNDEFINED:Zt,symbol:Or,copy_comments:Mr,swap_comments:ii}=ne(),Lr=h=>{let{length:e}=h,s=0,r=e/2;for(;s{Mr(h,e,s+r,s,u)},Q=(h,e,s,r,u,l)=>{if(u>0){let D=r;for(;D-- >0;)ei(h,e,s+D,u,l);return}let o=0;for(;o{Pr.forEach(s=>{let r=Or(s,e);delete h[r]})},Xr=(h,e)=>{let s=e;for(;s in h;)s=h[s];return s},Z=class extends Array{splice(...e){let{length:s}=this,r=super.splice(...e),[u,l,...o]=e;u<0&&(u+=s),arguments.length===1?l=s-u:l=Math.min(s-u,l);let{length:D}=o,m=D-l,f=u+l,p=s-f;return Q(this,this,f,p,m,!0),r}slice(...e){let{length:s}=this,r=super.slice(...e);if(!r.length)return new Z;let[u,l]=e;return l===Zt?l=s:l<0&&(l+=s),u<0?u+=s:u===Zt&&(u=0),Q(r,this,u,l-u,-u),r}unshift(...e){let{length:s}=this,r=super.unshift(...e),{length:u}=e;return u>0&&Q(this,this,0,s,u,!0),r}shift(){let e=super.shift(),{length:s}=this;return ti(this,0),Q(this,this,1,s,-1,!0),e}reverse(){return super.reverse(),Lr(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:s}=this,r=super.concat(...e);return e.length&&(Q(r,this,0,this.length,0),e.forEach(u=>{let l=s;s+=_r(u)?u.length:1,u instanceof Z&&Q(r,u,0,u.length,l)})),r}sort(...e){let s=Ir(this,...e.slice(0,1)),r=Object.create(null);return s.forEach((u,l)=>{if(u===l)return;let o=Xr(r,u);o!==l&&(r[l]=o,ii(this,l,o))}),this}};si.exports={CommentArray:Z}});var vi=_((Vn,gi)=>{var Rr=Nt(),{CommentArray:Jr}=We(),{PREFIX_BEFORE:Ee,PREFIX_AFTER_PROP:Ur,PREFIX_AFTER_COLON:zr,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:Ye,PREFIX_BEFORE_ALL:Hr,PREFIX_AFTER_ALL:jr,BRACKET_OPEN:Vr,BRACKET_CLOSE:ri,CURLY_BRACKET_OPEN:Kr,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$r,UNDEFINED:Ce,define:Qe,assign_non_prop_comments:Gr}=ne(),li=h=>Rr.tokenize(h,{comment:!0,loc:!0}),Ze=[],K=null,z=null,et=[],$,ci=!1,pi=!1,ae=null,oe=null,P=null,fi,ge=null,mi=()=>{et.length=Ze.length=0,oe=null,$=Ce},Wr=()=>{mi(),ae.length=0,z=K=ae=oe=P=ge=null},tt=h=>Symbol.for($!==Ce?h+ui+$:h),it=(h,e)=>ge?ge(h,e):e,di=()=>{let h=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(h,P.loc.start),h},xi=()=>{let h=new SyntaxError("Unexpected end of JSON input");throw Object.assign(h,oe?oe.loc.end:{line:1,column:0}),h},R=()=>{let h=ae[++fi];pi=P&&h&&P.loc.end.line===h.loc.start.line||!1,oe=P,P=h},qe=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),W=h=>qe()===h,De=h=>{W(h)||di()},st=h=>{Ze.push(K),K=h},rt=()=>{K=Ze.pop()},Di=()=>{if(!z)return;let h=[];for(let s of z)if(s.inline)h.push(s);else break;let{length:e}=h;e&&(e===z.length?z=null:z.splice(0,e),Qe(K,tt(Ye),h))},V=h=>{z&&(Qe(K,tt(h),z),z=null)},H=h=>{let e=[];for(;P&&(W("LineComment")||W("BlockComment"));){let s={...P,inline:pi};e.push(s),R()}if(!ci&&e.length){if(h){Qe(K,tt(h),e);return}z=e}},ve=(h,e)=>{e&&et.push($),$=h},Ei=()=>{$=et.pop()},qr=()=>{let h={};st(h),ve(Ce,!0);let e=!1,s;for(H();!W(ni)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ni)));)e=!0,De("String"),s=JSON.parse(P.value),ve(s),V(Ee),R(),H(Ur),De(ui),R(),H(zr),h[s]=it(s,nt()),H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h},Yr=()=>{let h=new Jr;st(h),ve(Ce,!0);let e=!1,s=0;for(H();!W(ri)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ri)));)e=!0,ve(s),V(Ee),h[s]=it(s,nt()),s++,H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h};function nt(){let h=qe();if(h===Kr)return R(),qr();if(h===Vr)return R(),Yr();let e=$r;h===ai&&(R(),h=qe(),e=ai);let s;switch(h){case"String":case"Boolean":case"Null":case"Numeric":return s=P.value,R(),JSON.parse(e+s);default:}}var Qr=h=>Object(h)===h,Zr=(h,e,s)=>{mi(),ae=li(h),ge=e,ci=s,ae.length||xi(),fi=-1,R(),st({}),H(Hr);let r=nt();return H(jr),P&&di(),!s&&r!==null&&(Qr(r)||(r=new Object(r)),Gr(r,K)),rt(),r=it("",r),Wr(),r};gi.exports={parse:Zr,tokenize:li}});var Ai=_((Kn,Ci)=>{"use strict";var j="",at;Ci.exports=en;function en(h,e){if(typeof h!="string")throw new TypeError("expected a string");if(e===1)return h;if(e===2)return h+h;var s=h.length*e;if(at!==h||typeof at>"u")at=h,j="";else if(j.length>=s)return j.substr(0,s);for(;s>j.length&&e>1;)e&1&&(j+=h),e>>=1,h+=h;return j+=h,j=j.substr(0,s),j}});var Ii=_(($n,_i)=>{var{isArray:ht,isObject:yi,isFunction:ut,isNumber:tn,isString:sn}=de(),rn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:lt,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:X,UNDEFINED:dn}=ne(),ot=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ct=" ",q=` +`,wi="null",bi=h=>`${Si}:${h}`,xn=h=>`${an}:${h}`,Dn=h=>`${on}:${h}`,ki=h=>`${un}:${h}`,Bi=h=>`${lt}:${h}`,En={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},gn=h=>(ot.lastIndex=0,ot.test(h)?h.replace(ot,e=>{let s=En[e];return typeof s=="string"?s:e}):h),Ti=h=>`"${gn(h)}"`,vn=(h,e)=>e?`//${h}`:`/*${h}*/`,L=(h,e,s,r)=>{let u=h[Symbol.for(e)];if(!u||!u.length)return X;let l=!1,o=u.reduce((D,{inline:m,type:f,value:p})=>{let d=m?ct:q+s;return l=f==="LineComment",D+d+vn(p,l)},X);return r||l?o+q+s:o},ee=null,he=X,Cn=()=>{ee=null,he=X},ue=(h,e,s)=>h?e?h+e.trim()+q+s:h.trimRight()+q+s:e?e.trimRight()+q+s:X,Ni=(h,e,s)=>{let r=L(e,Si,s+he,!0);return ue(r,h,s)},An=(h,e)=>{let s=e+he,{length:r}=h,u=X,l=X;for(let o=0;o{if(!h)return"null";let s=e+he,r=X,u=X,l=!0,o=ht(ee)?ee:Object.keys(h),D=m=>{let f=pt(m,h,s);if(f===dn)return;l||(r+=Fi),l=!1;let p=ue(u,L(h,bi(m),s),s);r+=p||q+s,r+=Ti(m)+L(h,xn(m),s)+mn+L(h,Dn(m),s)+ct+f+L(h,ki(m),s),u=L(h,Bi(m),s)};return o.forEach(D),r+=ue(u,L(h,lt,s),s),pn+Ni(r,h,e)+fn};function pt(h,e,s){let r=e[h];switch(yi(r)&&ut(r.toJSON)&&(r=r.toJSON(h)),ut(ee)&&(r=ee.call(e,h,r)),typeof r){case"string":return Ti(r);case"number":return Number.isFinite(r)?String(r):wi;case"boolean":case"null":return String(r);case"object":return ht(r)?An(r,s):yn(r,s);default:}}var Sn=h=>sn(h)?h:tn(h)?rn(ct,h):X,{toString:Fn}=Object.prototype,wn=["[object Number]","[object String]","[object Boolean]"],bn=h=>{if(typeof h!="object")return!1;let e=Fn.call(h);return wn.includes(e)};_i.exports=(h,e,s)=>{let r=Sn(s);if(!r)return JSON.stringify(h,e);!ut(e)&&!ht(e)&&(e=null),ee=e,he=r;let u=bn(h)?JSON.stringify(h):pt("",{"":h},X);return Cn(),yi(h)?L(h,nn,X).trimLeft()+u+L(h,hn,X).trimRight():u}});var Oi=_((Gn,Pi)=>{var{parse:kn,tokenize:Bn}=vi(),Tn=Ii(),{CommentArray:Nn}=We(),{assign:_n}=ne();Pi.exports={parse:kn,stringify:Tn,tokenize:Bn,CommentArray:Nn,assign:_n}});var Ae=we(Tt()),Li=require("path");var le=we(Oi()),ce=require("fs/promises"),J=we(require("path"));async function Mi(h,e,s,r,u){let l=(0,le.parse)((await(0,ce.readFile)((0,J.join)(process.cwd(),s,"rush.json"))).toString()),o=(0,J.join)(e,"rush.json"),D=J.default.resolve(e).split(J.default.sep),m=[];for(let f of[(0,J.join)(s,"rush.json"),...h]){let p=J.default.dirname(J.default.resolve(f)).split(J.default.sep),d=J.default.join(...p.slice(D.length)),c=await(0,le.parse)((await(0,ce.readFile)(f)).toString()),t=c.projects;for(let[i,n]of Object.entries(c))l[i]=n;m.push(...t.map(i=>Dt(xt({},i),{projectFolder:(0,J.join)(d,i.projectFolder),shouldPublish:d==="."?i.shouldPublish:!1})))}l.projects=m,await(0,ce.writeFile)(o,(0,le.stringify)(l,void 0,2))}console.info("Anticrm Platform Manager");Ae.program.version("0.6.0");Ae.program.command("rush-sync ").description("Synchronized rush.js files with platform.").option("-e, --exclude ","List of exclude patterns to override excludes (comma separated)","").option("-i, --include ","List of include patterns to override excludes (comma separated)","").option("-s, --source ","Comma separated list of rush_source.json files","rush_source.json").action(async(h,e)=>{await Mi(e.source.split(",").map(s=>(0,Li.join)(process.cwd(),s.trim())),process.cwd(),h,e.include.split(","),e.exclude.split(","))});Ae.program.parse(process.argv); /*! Bundled license information: repeat-string/index.js: diff --git a/tools/apm/package.json b/tools/apm/package.json index ddd057658a..82e2eab690 100644 --- a/tools/apm/package.json +++ b/tools/apm/package.json @@ -9,6 +9,7 @@ "build": "heft build", "build:watch": "tsc", "lint:fix": "eslint --fix src", + "bundle": "esbuild src/index.ts --bundle --minify --platform=node > apm.js", "lint": "eslint src", "format": "prettier --write src && eslint --fix src" }, diff --git a/tools/apm/src/index.ts b/tools/apm/src/index.ts index 452873d9e7..3a4dc8bcda 100644 --- a/tools/apm/src/index.ts +++ b/tools/apm/src/index.ts @@ -1,6 +1,6 @@ import { program } from 'commander' +import { join } from 'path' import { syncRushFiles } from './sync' -import { createTemplate } from './template' console.info('Anticrm Platform Manager') @@ -9,16 +9,17 @@ program.version('0.6.0') program .command('rush-sync ') .description('Synchronized rush.js files with platform.') - .action(async (root: string, cmd) => { - await syncRushFiles(process.cwd(), root) - }) - -program - .command('template-apply ') - .description('Create necessary startup packages') - .requiredOption('--root ', 'user password', 'platform') - .action(async (root: string, cmd) => { - await createTemplate(process.cwd(), root) + .option('-e, --exclude ', 'List of exclude patterns to override excludes (comma separated)', '') + .option('-i, --include ', 'List of include patterns to override excludes (comma separated)', '') + .option('-s, --source ', 'Comma separated list of rush_source.json files', 'rush_source.json') + .action(async (root: string, cmd: { include: string, exclude: string, source: string }) => { + await syncRushFiles( + cmd.source.split(',').map((it) => join(process.cwd(), it.trim())), + process.cwd(), + root, + cmd.include.split(','), + cmd.exclude.split(',') + ) }) program.parse(process.argv) diff --git a/tools/apm/src/sync.ts b/tools/apm/src/sync.ts index bc83dc2b6e..4c37a5facb 100644 --- a/tools/apm/src/sync.ts +++ b/tools/apm/src/sync.ts @@ -1,6 +1,6 @@ import { CommentArray, CommentObject, parse, stringify } from 'comment-json' import { readFile, writeFile } from 'fs/promises' -import { join } from 'path' +import path, { join } from 'path' interface RushPackage { packageName: string @@ -8,41 +8,58 @@ interface RushPackage { shouldPublish: boolean } -const ignoreProjects = new Set([ - '@hcengineering/prod', - '@hcengineering/pod-front', - '@hcengineering/pod-server', - '@hcengineering/pod-account' -]) -function platformFilter (root: string): (it: RushPackage) => boolean { - return (it) => { - return !it.projectFolder.startsWith(root) - } -} - -export async function syncRushFiles (root: string, platformRoot: string): Promise { +export async function syncRushFiles ( + root: string[], + targetRoot: string, + platformRoot: string, + include: string[], + exclude: string[] +): Promise { const platformJson: CommentObject = parse( - (await readFile(join(root, platformRoot, 'rush.json'))).toString() + (await readFile(join(process.cwd(), platformRoot, 'rush.json'))).toString() ) as CommentObject - const rushjs = join(root, 'rush.json') - const rushjsSource = join(root, 'rush_source.json') - const rushJson: CommentObject = parse((await readFile(rushjsSource)).toString()) as CommentObject - - const platformProjecs = (platformJson.projects as unknown as CommentArray).filter( - (it) => !ignoreProjects.has(it.packageName) - ) - const projects = rushJson.projects as unknown as CommentArray - - const newProjects = projects.filter(platformFilter(platformRoot)) - newProjects.push( - ...platformProjecs.map((it) => ({ - ...it, - projectFolder: join(platformRoot, it.projectFolder), - shouldPublish: false - })) - ) - - rushJson.projects = newProjects as unknown as CommentArray - - await writeFile(rushjs, stringify(rushJson, undefined, 2)) + + const rushjs = join(targetRoot, 'rush.json') + + const abs = path.resolve(targetRoot).split(path.sep) + + const projects: RushPackage[] = [] + + for (const prj of [join(platformRoot, 'rush.json'), ...root]) { + const sPath = path.dirname(path.resolve(prj)).split(path.sep) + const diff = path.join(...sPath.slice(abs.length)) + const rushJsonSource = (await parse((await readFile(prj)).toString())) as CommentObject + const sprojects = rushJsonSource.projects as unknown as CommentArray + for (const [k, v] of Object.entries(rushJsonSource)) { + platformJson[k] = v + } + + projects + .filter((it) => filterPackage(it, include, exclude)) + .push( + ...sprojects.map((it) => ({ + ...it, + projectFolder: join(diff, it.projectFolder), + shouldPublish: diff === '.' ? it.shouldPublish : false + })) + ) + } + + platformJson.projects = projects as unknown as CommentArray + + await writeFile(rushjs, stringify(platformJson, undefined, 2)) +} +function filterPackage (it: RushPackage, include: string[], exclude: string[]): boolean { + const pkgName = it.packageName + for (const i of include) { + if (pkgName.includes(i)) { + return true + } + } + for (const i of exclude) { + if (pkgName.includes(i)) { + return false + } + } + return true } From b2188af622fafa5a783e7e3a7292d2e76c1be397 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Mon, 19 Jun 2023 19:09:38 +0700 Subject: [PATCH 2/6] Build fixes Signed-off-by: Andrey Sobolev --- .github/workflows/main.yml | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6fc81d1591..d322329639 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,11 +10,11 @@ concurrency: on: # Triggers the workflow on push or pull request events but only for the main branch push: - branches: [main, develop] + branches: [main] tags: - v* pull_request: - branches: [main, develop] + branches: [main] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -205,14 +205,7 @@ jobs: mongodb-version: 5.0 - name: Testing... - uses: paambaati/codeclimate-action@v3.2.0 - env: - CC_TEST_REPORTER_ID: 346a83855d7124e9da8e6ec36a4fd01dc432f5cdc755eb28da7d9c44da9d1142 - with: - coverageCommand: node common/scripts/install-run-rush.js test --verbose - coverageLocations: | - ${{github.workspace}}/packages/*/coverage/lcov.info:lcov - ${{github.workspace}}/server/*/coverage/lcov.info:lcov + run: node common/scripts/install-run-rush.js test --verbose uitest: needs: build runs-on: ubuntu-latest @@ -282,12 +275,12 @@ jobs: with: name: playwright-results path: ./tests/sanity/playwright-report/ - - name: Upload DB snapshot - if: always() - uses: actions/upload-artifact@v3 - with: - name: db-snapshot - path: ./tests/db_dump + # - name: Upload DB snapshot + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: db-snapshot + # path: ./tests/db_dump docker-build: if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} needs: [build, uitest, test, svelte-check] From f267ab62e754e630fb067fe871a8b92e658d630d Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Mon, 19 Jun 2023 19:09:53 +0700 Subject: [PATCH 3/6] Build. fixes Signed-off-by: Andrey Sobolev --- server/minio/package.json | 3 ++- server/minio/tsconfig.json | 3 ++- tools/apm/apm.js | 4 ++-- tools/apm/src/sync.ts | 14 +++++++++----- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/server/minio/package.json b/server/minio/package.json index acc22060b8..62a51d7f51 100644 --- a/server/minio/package.json +++ b/server/minio/package.json @@ -24,7 +24,8 @@ "eslint-config-standard-with-typescript": "^23.0.0", "prettier": "^2.7.1", "@rushstack/heft": "^0.47.9", - "typescript": "^4.3.5" + "typescript": "^4.3.5", + "@types/node": "~16.11.12" }, "dependencies": { "@types/minio": "~7.0.11", diff --git a/server/minio/tsconfig.json b/server/minio/tsconfig.json index 9b47eded03..b80108b3cc 100644 --- a/server/minio/tsconfig.json +++ b/server/minio/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "rootDir": "./src", - "outDir": "./lib" + "outDir": "./lib", + "types": ["heft-jest", "node"], } } \ No newline at end of file diff --git a/tools/apm/apm.js b/tools/apm/apm.js index a255133758..00250a47ba 100644 --- a/tools/apm/apm.js +++ b/tools/apm/apm.js @@ -20,8 +20,8 @@ Expecting one of '${r.join("', '")}'`);let u=`${e}Help`;return this.on(u,l=>{let `&&++this.index,this.lineStart=this.index;else switch(a){case"n":p+=` `;break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,p+=this.scanUnicodeCodePointEscape();else{var x=this.index,E=this.scanHexEscape(a);E!==null?p+=E:(this.index=x,p+=a)}break;case"x":var C=this.scanHexEscape(a);C===null&&this.throwUnexpectedToken(l.Messages.InvalidHexEscapeSequence),p+=C;break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+="\v";break;default:a==="0"?(u.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral),p+="\0"):u.Character.isOctalDigit(a.charCodeAt(0))?this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral):p+=a;break}else u.Character.isLineTerminator(a.charCodeAt(0))?(++this.lineNumber,a==="\r"&&this.source[this.index]===` `&&++this.index,this.lineStart=this.index,p+=` -`):p+=a}return d||this.throwUnexpectedToken(),t||this.curlyStack.pop(),{type:10,value:this.source.slice(c+1,this.index-n),cooked:p,head:t,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:c,end:this.index}},f.prototype.testRegExp=function(p,d){var c="\uFFFF",t=p,i=this;d.indexOf("u")>=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];r.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],u.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(u.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!u.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t=55296&&p<57343&&u.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(10),u=s(12),l=s(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new u.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p{function ir(h){return Array.isArray?Array.isArray(h):me(h)==="[object Array]"}I.isArray=ir;function sr(h){return typeof h=="boolean"}I.isBoolean=sr;function rr(h){return h===null}I.isNull=rr;function nr(h){return h==null}I.isNullOrUndefined=nr;function ar(h){return typeof h=="number"}I.isNumber=ar;function or(h){return typeof h=="string"}I.isString=or;function ur(h){return typeof h=="symbol"}I.isSymbol=ur;function hr(h){return h===void 0}I.isUndefined=hr;function lr(h){return me(h)==="[object RegExp]"}I.isRegExp=lr;function cr(h){return typeof h=="object"&&h!==null}I.isObject=cr;function pr(h){return me(h)==="[object Date]"}I.isDate=pr;function fr(h){return me(h)==="[object Error]"||h instanceof Error}I.isError=fr;function mr(h){return typeof h=="function"}I.isFunction=mr;function dr(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||typeof h=="symbol"||typeof h>"u"}I.isPrimitive=dr;I.isBuffer=require("buffer").Buffer.isBuffer;function me(h){return Object.prototype.toString.call(h)}});var Rt=_((Un,Xt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=h=>h<1e5?h<100?h<10?0:1:h<1e4?h<1e3?2:3:4:h<1e7?h<1e6?5:6:h<1e9?h<1e8?7:8:9;function Pt(h,e){if(h===e)return 0;if(~~h===h&&~~e===e){if(h===0||e===0)return h=0)return-1;if(h>=0)return 1;h=-h,e=-e}let u=It(h),l=It(e),o=0;return ul&&(e*=_t[u-l-1],h/=10,o=1),h===e?o:h=32;)e|=h&1,h>>=1;return h+e}function Ot(h,e,s,r){let u=e+1;if(u===s)return 1;if(r(h[u++],h[e])<0){for(;u=0;)u++;return u-e}function Mt(h,e,s){for(s--;e>>1;u(l,h[p])<0?m=p:D=p+1}let f=r-D;switch(f){case 3:h[D+3]=h[D+2],F[D+3]=F[D+2];case 2:h[D+2]=h[D+1],F[D+2]=F[D+1];case 1:h[D+1]=h[D],F[D+1]=F[D];break;default:for(;f>0;)h[D+f]=h[D+f-1],F[D+f]=F[D+f-1],f--}h[D]=l,F[D]=o}}function Ue(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])>0){for(D=r-u;m0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}else{for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}for(o++;o>>1);l(h,e[s+f])>0?o=f+1:m=f}return m}function ze(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])<0){for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}else{for(D=r-u;m=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}for(o++;o>>1);l(h,e[s+f])<0?m=f:o=f+1}return m}var He=class{constructor(e,s){this.array=e,this.compare=s;let{length:r}=e;this.length=r,this.minGallop=7,this.tmpStorageLength=r<2*256?r>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=r<120?5:r<1542?10:r<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,s){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=s,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),s===1){for(f=0;f=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--s===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--u===1){E=!0;break}while((a|x)=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(s===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--u===1){E=!0;break}if(x=u-Ue(o[p],D,0,u,u-1,l),x!==0){for(c-=x,d-=x,u-=x,i=c+1,t=d+1,f=0;f=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),u===1){for(c-=s,p-=s,i=c+1,t=p+1,f=s-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(u===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(u-1),f=0;ff&&(p=f),Lt(h,s,s+p,s+D,e),D=p}m.pushRun(s,D),m.mergeRuns(),o-=D,s+=D}while(o!==0);return m.forceMergeRuns(),F}Xt.exports={sort:Dr}});var Ut=_((zn,Jt)=>{"use strict";var Er=Object.prototype.hasOwnProperty;Jt.exports=(h,e)=>Er.call(h,e)});var ne=_((Hn,Qt)=>{var Ke=Ut(),{isObject:zt,isArray:gr,isString:vr,isNumber:Cr}=de(),$e="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",Ar="[",yr="]",Sr="{",Fr="}",wr=",",br="",kr="-",Ge=[$e,jt,Vt,Kt,$t],Br=[$e,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(h,e)=>Symbol.for(h+qt+e),xe=(h,e,s)=>Object.defineProperty(h,e,{value:s,writable:!0,configurable:!0}),Ve=(h,e,s,r,u,l)=>{let o=re(u,r);if(!Ke(e,o))return;let D=s===r?o:re(u,s);xe(h,D,e[o]),l&&delete e[o]},Yt=(h,e,s,r,u)=>{Ge.forEach(l=>{Ve(h,e,s,r,l,u)})},Tr=(h,e,s)=>{e!==s&&Ge.forEach(r=>{let u=re(r,s);if(!Ke(h,u)){Ve(h,h,s,e,r,!0);return}let l=h[u];delete h[u],Ve(h,h,s,e,r,!0),xe(h,re(r,e),l)})},je=(h,e)=>{Br.forEach(s=>{let r=e[s];r&&xe(h,s,r)})},Nr=(h,e,s)=>(s.forEach(r=>{!vr(r)&&!Cr(r)||Ke(e,r)&&(h[r]=e[r],Yt(h,e,r,r))}),h);Qt.exports={SYMBOL_PREFIXES:Ge,PREFIX_BEFORE:$e,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:Ar,BRACKET_CLOSE:yr,CURLY_BRACKET_OPEN:Sr,CURLY_BRACKET_CLOSE:Fr,COLON:qt,COMMA:wr,MINUS:kr,EMPTY:br,UNDEFINED:Ht,symbol:re,define:xe,copy_comments:Yt,swap_comments:Tr,assign_non_prop_comments:je,assign(h,e,s){if(!zt(h))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return h;if(s===Ht)s=Object.keys(e),je(h,e);else if(gr(s))s.length===0&&je(h,e);else throw new TypeError("keys must be array or undefined");return Nr(h,e,s)}}});var We=_((jn,si)=>{var{isArray:_r}=de(),{sort:Ir}=Rt(),{SYMBOL_PREFIXES:Pr,UNDEFINED:Zt,symbol:Or,copy_comments:Mr,swap_comments:ii}=ne(),Lr=h=>{let{length:e}=h,s=0,r=e/2;for(;s{Mr(h,e,s+r,s,u)},Q=(h,e,s,r,u,l)=>{if(u>0){let D=r;for(;D-- >0;)ei(h,e,s+D,u,l);return}let o=0;for(;o{Pr.forEach(s=>{let r=Or(s,e);delete h[r]})},Xr=(h,e)=>{let s=e;for(;s in h;)s=h[s];return s},Z=class extends Array{splice(...e){let{length:s}=this,r=super.splice(...e),[u,l,...o]=e;u<0&&(u+=s),arguments.length===1?l=s-u:l=Math.min(s-u,l);let{length:D}=o,m=D-l,f=u+l,p=s-f;return Q(this,this,f,p,m,!0),r}slice(...e){let{length:s}=this,r=super.slice(...e);if(!r.length)return new Z;let[u,l]=e;return l===Zt?l=s:l<0&&(l+=s),u<0?u+=s:u===Zt&&(u=0),Q(r,this,u,l-u,-u),r}unshift(...e){let{length:s}=this,r=super.unshift(...e),{length:u}=e;return u>0&&Q(this,this,0,s,u,!0),r}shift(){let e=super.shift(),{length:s}=this;return ti(this,0),Q(this,this,1,s,-1,!0),e}reverse(){return super.reverse(),Lr(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:s}=this,r=super.concat(...e);return e.length&&(Q(r,this,0,this.length,0),e.forEach(u=>{let l=s;s+=_r(u)?u.length:1,u instanceof Z&&Q(r,u,0,u.length,l)})),r}sort(...e){let s=Ir(this,...e.slice(0,1)),r=Object.create(null);return s.forEach((u,l)=>{if(u===l)return;let o=Xr(r,u);o!==l&&(r[l]=o,ii(this,l,o))}),this}};si.exports={CommentArray:Z}});var vi=_((Vn,gi)=>{var Rr=Nt(),{CommentArray:Jr}=We(),{PREFIX_BEFORE:Ee,PREFIX_AFTER_PROP:Ur,PREFIX_AFTER_COLON:zr,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:Ye,PREFIX_BEFORE_ALL:Hr,PREFIX_AFTER_ALL:jr,BRACKET_OPEN:Vr,BRACKET_CLOSE:ri,CURLY_BRACKET_OPEN:Kr,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$r,UNDEFINED:Ce,define:Qe,assign_non_prop_comments:Gr}=ne(),li=h=>Rr.tokenize(h,{comment:!0,loc:!0}),Ze=[],K=null,z=null,et=[],$,ci=!1,pi=!1,ae=null,oe=null,P=null,fi,ge=null,mi=()=>{et.length=Ze.length=0,oe=null,$=Ce},Wr=()=>{mi(),ae.length=0,z=K=ae=oe=P=ge=null},tt=h=>Symbol.for($!==Ce?h+ui+$:h),it=(h,e)=>ge?ge(h,e):e,di=()=>{let h=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(h,P.loc.start),h},xi=()=>{let h=new SyntaxError("Unexpected end of JSON input");throw Object.assign(h,oe?oe.loc.end:{line:1,column:0}),h},R=()=>{let h=ae[++fi];pi=P&&h&&P.loc.end.line===h.loc.start.line||!1,oe=P,P=h},qe=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),W=h=>qe()===h,De=h=>{W(h)||di()},st=h=>{Ze.push(K),K=h},rt=()=>{K=Ze.pop()},Di=()=>{if(!z)return;let h=[];for(let s of z)if(s.inline)h.push(s);else break;let{length:e}=h;e&&(e===z.length?z=null:z.splice(0,e),Qe(K,tt(Ye),h))},V=h=>{z&&(Qe(K,tt(h),z),z=null)},H=h=>{let e=[];for(;P&&(W("LineComment")||W("BlockComment"));){let s={...P,inline:pi};e.push(s),R()}if(!ci&&e.length){if(h){Qe(K,tt(h),e);return}z=e}},ve=(h,e)=>{e&&et.push($),$=h},Ei=()=>{$=et.pop()},qr=()=>{let h={};st(h),ve(Ce,!0);let e=!1,s;for(H();!W(ni)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ni)));)e=!0,De("String"),s=JSON.parse(P.value),ve(s),V(Ee),R(),H(Ur),De(ui),R(),H(zr),h[s]=it(s,nt()),H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h},Yr=()=>{let h=new Jr;st(h),ve(Ce,!0);let e=!1,s=0;for(H();!W(ri)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ri)));)e=!0,ve(s),V(Ee),h[s]=it(s,nt()),s++,H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h};function nt(){let h=qe();if(h===Kr)return R(),qr();if(h===Vr)return R(),Yr();let e=$r;h===ai&&(R(),h=qe(),e=ai);let s;switch(h){case"String":case"Boolean":case"Null":case"Numeric":return s=P.value,R(),JSON.parse(e+s);default:}}var Qr=h=>Object(h)===h,Zr=(h,e,s)=>{mi(),ae=li(h),ge=e,ci=s,ae.length||xi(),fi=-1,R(),st({}),H(Hr);let r=nt();return H(jr),P&&di(),!s&&r!==null&&(Qr(r)||(r=new Object(r)),Gr(r,K)),rt(),r=it("",r),Wr(),r};gi.exports={parse:Zr,tokenize:li}});var Ai=_((Kn,Ci)=>{"use strict";var j="",at;Ci.exports=en;function en(h,e){if(typeof h!="string")throw new TypeError("expected a string");if(e===1)return h;if(e===2)return h+h;var s=h.length*e;if(at!==h||typeof at>"u")at=h,j="";else if(j.length>=s)return j.substr(0,s);for(;s>j.length&&e>1;)e&1&&(j+=h),e>>=1,h+=h;return j+=h,j=j.substr(0,s),j}});var Ii=_(($n,_i)=>{var{isArray:ht,isObject:yi,isFunction:ut,isNumber:tn,isString:sn}=de(),rn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:lt,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:X,UNDEFINED:dn}=ne(),ot=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ct=" ",q=` -`,wi="null",bi=h=>`${Si}:${h}`,xn=h=>`${an}:${h}`,Dn=h=>`${on}:${h}`,ki=h=>`${un}:${h}`,Bi=h=>`${lt}:${h}`,En={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},gn=h=>(ot.lastIndex=0,ot.test(h)?h.replace(ot,e=>{let s=En[e];return typeof s=="string"?s:e}):h),Ti=h=>`"${gn(h)}"`,vn=(h,e)=>e?`//${h}`:`/*${h}*/`,L=(h,e,s,r)=>{let u=h[Symbol.for(e)];if(!u||!u.length)return X;let l=!1,o=u.reduce((D,{inline:m,type:f,value:p})=>{let d=m?ct:q+s;return l=f==="LineComment",D+d+vn(p,l)},X);return r||l?o+q+s:o},ee=null,he=X,Cn=()=>{ee=null,he=X},ue=(h,e,s)=>h?e?h+e.trim()+q+s:h.trimRight()+q+s:e?e.trimRight()+q+s:X,Ni=(h,e,s)=>{let r=L(e,Si,s+he,!0);return ue(r,h,s)},An=(h,e)=>{let s=e+he,{length:r}=h,u=X,l=X;for(let o=0;o{if(!h)return"null";let s=e+he,r=X,u=X,l=!0,o=ht(ee)?ee:Object.keys(h),D=m=>{let f=pt(m,h,s);if(f===dn)return;l||(r+=Fi),l=!1;let p=ue(u,L(h,bi(m),s),s);r+=p||q+s,r+=Ti(m)+L(h,xn(m),s)+mn+L(h,Dn(m),s)+ct+f+L(h,ki(m),s),u=L(h,Bi(m),s)};return o.forEach(D),r+=ue(u,L(h,lt,s),s),pn+Ni(r,h,e)+fn};function pt(h,e,s){let r=e[h];switch(yi(r)&&ut(r.toJSON)&&(r=r.toJSON(h)),ut(ee)&&(r=ee.call(e,h,r)),typeof r){case"string":return Ti(r);case"number":return Number.isFinite(r)?String(r):wi;case"boolean":case"null":return String(r);case"object":return ht(r)?An(r,s):yn(r,s);default:}}var Sn=h=>sn(h)?h:tn(h)?rn(ct,h):X,{toString:Fn}=Object.prototype,wn=["[object Number]","[object String]","[object Boolean]"],bn=h=>{if(typeof h!="object")return!1;let e=Fn.call(h);return wn.includes(e)};_i.exports=(h,e,s)=>{let r=Sn(s);if(!r)return JSON.stringify(h,e);!ut(e)&&!ht(e)&&(e=null),ee=e,he=r;let u=bn(h)?JSON.stringify(h):pt("",{"":h},X);return Cn(),yi(h)?L(h,nn,X).trimLeft()+u+L(h,hn,X).trimRight():u}});var Oi=_((Gn,Pi)=>{var{parse:kn,tokenize:Bn}=vi(),Tn=Ii(),{CommentArray:Nn}=We(),{assign:_n}=ne();Pi.exports={parse:kn,stringify:Tn,tokenize:Bn,CommentArray:Nn,assign:_n}});var Ae=we(Tt()),Li=require("path");var le=we(Oi()),ce=require("fs/promises"),J=we(require("path"));async function Mi(h,e,s,r,u){let l=(0,le.parse)((await(0,ce.readFile)((0,J.join)(process.cwd(),s,"rush.json"))).toString()),o=(0,J.join)(e,"rush.json"),D=J.default.resolve(e).split(J.default.sep),m=[];for(let f of[(0,J.join)(s,"rush.json"),...h]){let p=J.default.dirname(J.default.resolve(f)).split(J.default.sep),d=J.default.join(...p.slice(D.length)),c=await(0,le.parse)((await(0,ce.readFile)(f)).toString()),t=c.projects;for(let[i,n]of Object.entries(c))l[i]=n;m.push(...t.map(i=>Dt(xt({},i),{projectFolder:(0,J.join)(d,i.projectFolder),shouldPublish:d==="."?i.shouldPublish:!1})))}l.projects=m,await(0,ce.writeFile)(o,(0,le.stringify)(l,void 0,2))}console.info("Anticrm Platform Manager");Ae.program.version("0.6.0");Ae.program.command("rush-sync ").description("Synchronized rush.js files with platform.").option("-e, --exclude ","List of exclude patterns to override excludes (comma separated)","").option("-i, --include ","List of include patterns to override excludes (comma separated)","").option("-s, --source ","Comma separated list of rush_source.json files","rush_source.json").action(async(h,e)=>{await Mi(e.source.split(",").map(s=>(0,Li.join)(process.cwd(),s.trim())),process.cwd(),h,e.include.split(","),e.exclude.split(","))});Ae.program.parse(process.argv); +`):p+=a}return d||this.throwUnexpectedToken(),t||this.curlyStack.pop(),{type:10,value:this.source.slice(c+1,this.index-n),cooked:p,head:t,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:c,end:this.index}},f.prototype.testRegExp=function(p,d){var c="\uFFFF",t=p,i=this;d.indexOf("u")>=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];r.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],u.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(u.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!u.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t=55296&&p<57343&&u.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(10),u=s(12),l=s(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new u.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p{function ir(h){return Array.isArray?Array.isArray(h):me(h)==="[object Array]"}I.isArray=ir;function sr(h){return typeof h=="boolean"}I.isBoolean=sr;function rr(h){return h===null}I.isNull=rr;function nr(h){return h==null}I.isNullOrUndefined=nr;function ar(h){return typeof h=="number"}I.isNumber=ar;function or(h){return typeof h=="string"}I.isString=or;function ur(h){return typeof h=="symbol"}I.isSymbol=ur;function hr(h){return h===void 0}I.isUndefined=hr;function lr(h){return me(h)==="[object RegExp]"}I.isRegExp=lr;function cr(h){return typeof h=="object"&&h!==null}I.isObject=cr;function pr(h){return me(h)==="[object Date]"}I.isDate=pr;function fr(h){return me(h)==="[object Error]"||h instanceof Error}I.isError=fr;function mr(h){return typeof h=="function"}I.isFunction=mr;function dr(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||typeof h=="symbol"||typeof h>"u"}I.isPrimitive=dr;I.isBuffer=require("buffer").Buffer.isBuffer;function me(h){return Object.prototype.toString.call(h)}});var Rt=_((zn,Xt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=h=>h<1e5?h<100?h<10?0:1:h<1e4?h<1e3?2:3:4:h<1e7?h<1e6?5:6:h<1e9?h<1e8?7:8:9;function Pt(h,e){if(h===e)return 0;if(~~h===h&&~~e===e){if(h===0||e===0)return h=0)return-1;if(h>=0)return 1;h=-h,e=-e}let u=It(h),l=It(e),o=0;return ul&&(e*=_t[u-l-1],h/=10,o=1),h===e?o:h=32;)e|=h&1,h>>=1;return h+e}function Ot(h,e,s,r){let u=e+1;if(u===s)return 1;if(r(h[u++],h[e])<0){for(;u=0;)u++;return u-e}function Mt(h,e,s){for(s--;e>>1;u(l,h[p])<0?m=p:D=p+1}let f=r-D;switch(f){case 3:h[D+3]=h[D+2],F[D+3]=F[D+2];case 2:h[D+2]=h[D+1],F[D+2]=F[D+1];case 1:h[D+1]=h[D],F[D+1]=F[D];break;default:for(;f>0;)h[D+f]=h[D+f-1],F[D+f]=F[D+f-1],f--}h[D]=l,F[D]=o}}function Ue(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])>0){for(D=r-u;m0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}else{for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}for(o++;o>>1);l(h,e[s+f])>0?o=f+1:m=f}return m}function ze(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])<0){for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}else{for(D=r-u;m=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}for(o++;o>>1);l(h,e[s+f])<0?m=f:o=f+1}return m}var He=class{constructor(e,s){this.array=e,this.compare=s;let{length:r}=e;this.length=r,this.minGallop=7,this.tmpStorageLength=r<2*256?r>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=r<120?5:r<1542?10:r<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,s){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=s,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),s===1){for(f=0;f=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--s===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--u===1){E=!0;break}while((a|x)=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(s===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--u===1){E=!0;break}if(x=u-Ue(o[p],D,0,u,u-1,l),x!==0){for(c-=x,d-=x,u-=x,i=c+1,t=d+1,f=0;f=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),u===1){for(c-=s,p-=s,i=c+1,t=p+1,f=s-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(u===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(u-1),f=0;ff&&(p=f),Lt(h,s,s+p,s+D,e),D=p}m.pushRun(s,D),m.mergeRuns(),o-=D,s+=D}while(o!==0);return m.forceMergeRuns(),F}Xt.exports={sort:Dr}});var Ut=_((Hn,Jt)=>{"use strict";var Er=Object.prototype.hasOwnProperty;Jt.exports=(h,e)=>Er.call(h,e)});var ne=_((jn,Qt)=>{var Ke=Ut(),{isObject:zt,isArray:gr,isString:vr,isNumber:Cr}=de(),$e="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",Ar="[",yr="]",Sr="{",Fr="}",wr=",",br="",kr="-",Ge=[$e,jt,Vt,Kt,$t],Br=[$e,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(h,e)=>Symbol.for(h+qt+e),xe=(h,e,s)=>Object.defineProperty(h,e,{value:s,writable:!0,configurable:!0}),Ve=(h,e,s,r,u,l)=>{let o=re(u,r);if(!Ke(e,o))return;let D=s===r?o:re(u,s);xe(h,D,e[o]),l&&delete e[o]},Yt=(h,e,s,r,u)=>{Ge.forEach(l=>{Ve(h,e,s,r,l,u)})},Tr=(h,e,s)=>{e!==s&&Ge.forEach(r=>{let u=re(r,s);if(!Ke(h,u)){Ve(h,h,s,e,r,!0);return}let l=h[u];delete h[u],Ve(h,h,s,e,r,!0),xe(h,re(r,e),l)})},je=(h,e)=>{Br.forEach(s=>{let r=e[s];r&&xe(h,s,r)})},Nr=(h,e,s)=>(s.forEach(r=>{!vr(r)&&!Cr(r)||Ke(e,r)&&(h[r]=e[r],Yt(h,e,r,r))}),h);Qt.exports={SYMBOL_PREFIXES:Ge,PREFIX_BEFORE:$e,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:Ar,BRACKET_CLOSE:yr,CURLY_BRACKET_OPEN:Sr,CURLY_BRACKET_CLOSE:Fr,COLON:qt,COMMA:wr,MINUS:kr,EMPTY:br,UNDEFINED:Ht,symbol:re,define:xe,copy_comments:Yt,swap_comments:Tr,assign_non_prop_comments:je,assign(h,e,s){if(!zt(h))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return h;if(s===Ht)s=Object.keys(e),je(h,e);else if(gr(s))s.length===0&&je(h,e);else throw new TypeError("keys must be array or undefined");return Nr(h,e,s)}}});var We=_((Vn,si)=>{var{isArray:_r}=de(),{sort:Ir}=Rt(),{SYMBOL_PREFIXES:Pr,UNDEFINED:Zt,symbol:Or,copy_comments:Mr,swap_comments:ii}=ne(),Lr=h=>{let{length:e}=h,s=0,r=e/2;for(;s{Mr(h,e,s+r,s,u)},Q=(h,e,s,r,u,l)=>{if(u>0){let D=r;for(;D-- >0;)ei(h,e,s+D,u,l);return}let o=0;for(;o{Pr.forEach(s=>{let r=Or(s,e);delete h[r]})},Xr=(h,e)=>{let s=e;for(;s in h;)s=h[s];return s},Z=class extends Array{splice(...e){let{length:s}=this,r=super.splice(...e),[u,l,...o]=e;u<0&&(u+=s),arguments.length===1?l=s-u:l=Math.min(s-u,l);let{length:D}=o,m=D-l,f=u+l,p=s-f;return Q(this,this,f,p,m,!0),r}slice(...e){let{length:s}=this,r=super.slice(...e);if(!r.length)return new Z;let[u,l]=e;return l===Zt?l=s:l<0&&(l+=s),u<0?u+=s:u===Zt&&(u=0),Q(r,this,u,l-u,-u),r}unshift(...e){let{length:s}=this,r=super.unshift(...e),{length:u}=e;return u>0&&Q(this,this,0,s,u,!0),r}shift(){let e=super.shift(),{length:s}=this;return ti(this,0),Q(this,this,1,s,-1,!0),e}reverse(){return super.reverse(),Lr(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:s}=this,r=super.concat(...e);return e.length&&(Q(r,this,0,this.length,0),e.forEach(u=>{let l=s;s+=_r(u)?u.length:1,u instanceof Z&&Q(r,u,0,u.length,l)})),r}sort(...e){let s=Ir(this,...e.slice(0,1)),r=Object.create(null);return s.forEach((u,l)=>{if(u===l)return;let o=Xr(r,u);o!==l&&(r[l]=o,ii(this,l,o))}),this}};si.exports={CommentArray:Z}});var vi=_((Kn,gi)=>{var Rr=Nt(),{CommentArray:Jr}=We(),{PREFIX_BEFORE:Ee,PREFIX_AFTER_PROP:Ur,PREFIX_AFTER_COLON:zr,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:Ye,PREFIX_BEFORE_ALL:Hr,PREFIX_AFTER_ALL:jr,BRACKET_OPEN:Vr,BRACKET_CLOSE:ri,CURLY_BRACKET_OPEN:Kr,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$r,UNDEFINED:Ce,define:Qe,assign_non_prop_comments:Gr}=ne(),li=h=>Rr.tokenize(h,{comment:!0,loc:!0}),Ze=[],K=null,z=null,et=[],$,ci=!1,pi=!1,ae=null,oe=null,P=null,fi,ge=null,mi=()=>{et.length=Ze.length=0,oe=null,$=Ce},Wr=()=>{mi(),ae.length=0,z=K=ae=oe=P=ge=null},tt=h=>Symbol.for($!==Ce?h+ui+$:h),it=(h,e)=>ge?ge(h,e):e,di=()=>{let h=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(h,P.loc.start),h},xi=()=>{let h=new SyntaxError("Unexpected end of JSON input");throw Object.assign(h,oe?oe.loc.end:{line:1,column:0}),h},R=()=>{let h=ae[++fi];pi=P&&h&&P.loc.end.line===h.loc.start.line||!1,oe=P,P=h},qe=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),W=h=>qe()===h,De=h=>{W(h)||di()},st=h=>{Ze.push(K),K=h},rt=()=>{K=Ze.pop()},Di=()=>{if(!z)return;let h=[];for(let s of z)if(s.inline)h.push(s);else break;let{length:e}=h;e&&(e===z.length?z=null:z.splice(0,e),Qe(K,tt(Ye),h))},V=h=>{z&&(Qe(K,tt(h),z),z=null)},H=h=>{let e=[];for(;P&&(W("LineComment")||W("BlockComment"));){let s={...P,inline:pi};e.push(s),R()}if(!ci&&e.length){if(h){Qe(K,tt(h),e);return}z=e}},ve=(h,e)=>{e&&et.push($),$=h},Ei=()=>{$=et.pop()},qr=()=>{let h={};st(h),ve(Ce,!0);let e=!1,s;for(H();!W(ni)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ni)));)e=!0,De("String"),s=JSON.parse(P.value),ve(s),V(Ee),R(),H(Ur),De(ui),R(),H(zr),h[s]=it(s,nt()),H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h},Yr=()=>{let h=new Jr;st(h),ve(Ce,!0);let e=!1,s=0;for(H();!W(ri)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ri)));)e=!0,ve(s),V(Ee),h[s]=it(s,nt()),s++,H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h};function nt(){let h=qe();if(h===Kr)return R(),qr();if(h===Vr)return R(),Yr();let e=$r;h===ai&&(R(),h=qe(),e=ai);let s;switch(h){case"String":case"Boolean":case"Null":case"Numeric":return s=P.value,R(),JSON.parse(e+s);default:}}var Qr=h=>Object(h)===h,Zr=(h,e,s)=>{mi(),ae=li(h),ge=e,ci=s,ae.length||xi(),fi=-1,R(),st({}),H(Hr);let r=nt();return H(jr),P&&di(),!s&&r!==null&&(Qr(r)||(r=new Object(r)),Gr(r,K)),rt(),r=it("",r),Wr(),r};gi.exports={parse:Zr,tokenize:li}});var Ai=_(($n,Ci)=>{"use strict";var j="",at;Ci.exports=en;function en(h,e){if(typeof h!="string")throw new TypeError("expected a string");if(e===1)return h;if(e===2)return h+h;var s=h.length*e;if(at!==h||typeof at>"u")at=h,j="";else if(j.length>=s)return j.substr(0,s);for(;s>j.length&&e>1;)e&1&&(j+=h),e>>=1,h+=h;return j+=h,j=j.substr(0,s),j}});var Ii=_((Gn,_i)=>{var{isArray:ht,isObject:yi,isFunction:ut,isNumber:tn,isString:sn}=de(),rn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:lt,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:X,UNDEFINED:dn}=ne(),ot=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ct=" ",q=` +`,wi="null",bi=h=>`${Si}:${h}`,xn=h=>`${an}:${h}`,Dn=h=>`${on}:${h}`,ki=h=>`${un}:${h}`,Bi=h=>`${lt}:${h}`,En={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},gn=h=>(ot.lastIndex=0,ot.test(h)?h.replace(ot,e=>{let s=En[e];return typeof s=="string"?s:e}):h),Ti=h=>`"${gn(h)}"`,vn=(h,e)=>e?`//${h}`:`/*${h}*/`,L=(h,e,s,r)=>{let u=h[Symbol.for(e)];if(!u||!u.length)return X;let l=!1,o=u.reduce((D,{inline:m,type:f,value:p})=>{let d=m?ct:q+s;return l=f==="LineComment",D+d+vn(p,l)},X);return r||l?o+q+s:o},ee=null,he=X,Cn=()=>{ee=null,he=X},ue=(h,e,s)=>h?e?h+e.trim()+q+s:h.trimRight()+q+s:e?e.trimRight()+q+s:X,Ni=(h,e,s)=>{let r=L(e,Si,s+he,!0);return ue(r,h,s)},An=(h,e)=>{let s=e+he,{length:r}=h,u=X,l=X;for(let o=0;o{if(!h)return"null";let s=e+he,r=X,u=X,l=!0,o=ht(ee)?ee:Object.keys(h),D=m=>{let f=pt(m,h,s);if(f===dn)return;l||(r+=Fi),l=!1;let p=ue(u,L(h,bi(m),s),s);r+=p||q+s,r+=Ti(m)+L(h,xn(m),s)+mn+L(h,Dn(m),s)+ct+f+L(h,ki(m),s),u=L(h,Bi(m),s)};return o.forEach(D),r+=ue(u,L(h,lt,s),s),pn+Ni(r,h,e)+fn};function pt(h,e,s){let r=e[h];switch(yi(r)&&ut(r.toJSON)&&(r=r.toJSON(h)),ut(ee)&&(r=ee.call(e,h,r)),typeof r){case"string":return Ti(r);case"number":return Number.isFinite(r)?String(r):wi;case"boolean":case"null":return String(r);case"object":return ht(r)?An(r,s):yn(r,s);default:}}var Sn=h=>sn(h)?h:tn(h)?rn(ct,h):X,{toString:Fn}=Object.prototype,wn=["[object Number]","[object String]","[object Boolean]"],bn=h=>{if(typeof h!="object")return!1;let e=Fn.call(h);return wn.includes(e)};_i.exports=(h,e,s)=>{let r=Sn(s);if(!r)return JSON.stringify(h,e);!ut(e)&&!ht(e)&&(e=null),ee=e,he=r;let u=bn(h)?JSON.stringify(h):pt("",{"":h},X);return Cn(),yi(h)?L(h,nn,X).trimLeft()+u+L(h,hn,X).trimRight():u}});var Oi=_((Wn,Pi)=>{var{parse:kn,tokenize:Bn}=vi(),Tn=Ii(),{CommentArray:Nn}=We(),{assign:_n}=ne();Pi.exports={parse:kn,stringify:Tn,tokenize:Bn,CommentArray:Nn,assign:_n}});var Ae=we(Tt()),Li=require("path");var le=we(Oi()),ce=require("fs/promises"),J=we(require("path"));async function Mi(h,e,s,r,u){var f;let l=(0,le.parse)((await(0,ce.readFile)((0,J.join)(process.cwd(),s,"rush.json"))).toString()),o=(0,J.join)(e,"rush.json"),D=J.default.resolve(e).split(J.default.sep),m=[];for(let p of[(0,J.join)(s,"rush.json"),...h]){let d=J.default.dirname(J.default.resolve(p)).split(J.default.sep),c=J.default.join(...d.slice(D.length)),t=await(0,le.parse)((await(0,ce.readFile)(p)).toString());console.log("Processing",p,(f=t.projects)==null?void 0:f.length);let i=t.projects;for(let[n,a]of Object.entries(t))l[n]=a;m.push(...i.filter(n=>In(n,r,u)).map(n=>Dt(xt({},n),{projectFolder:(0,J.join)(c,n.projectFolder),shouldPublish:c==="."?n.shouldPublish:!1})))}l.projects=m,await(0,ce.writeFile)(o,(0,le.stringify)(l,void 0,2))}function In(h,e,s){let r=h.packageName;for(let u of e)if(r.includes(u))return console.log("include",r,u),!0;for(let u of s)if(r.includes(u))return console.log("exclude",r,u),!1;return console.log("filter",r,"true"),!0}console.info("Anticrm Platform Manager");Ae.program.version("0.6.0");Ae.program.command("rush-sync ").description("Synchronized rush.js files with platform.").option("-e, --exclude ","List of exclude patterns to override excludes (comma separated)","").option("-i, --include ","List of include patterns to override excludes (comma separated)","").option("-s, --source ","Comma separated list of rush_source.json files","rush_source.json").action(async(h,e)=>{await Mi(e.source.split(",").map(s=>(0,Li.join)(process.cwd(),s.trim())),process.cwd(),h,e.include.split(","),e.exclude.split(","))});Ae.program.parse(process.argv); /*! Bundled license information: repeat-string/index.js: diff --git a/tools/apm/src/sync.ts b/tools/apm/src/sync.ts index 4c37a5facb..b7f5e7a8be 100644 --- a/tools/apm/src/sync.ts +++ b/tools/apm/src/sync.ts @@ -29,20 +29,21 @@ export async function syncRushFiles ( const sPath = path.dirname(path.resolve(prj)).split(path.sep) const diff = path.join(...sPath.slice(abs.length)) const rushJsonSource = (await parse((await readFile(prj)).toString())) as CommentObject + console.log('Processing', prj, (rushJsonSource.projects as any)?.length) const sprojects = rushJsonSource.projects as unknown as CommentArray for (const [k, v] of Object.entries(rushJsonSource)) { platformJson[k] = v } - projects - .filter((it) => filterPackage(it, include, exclude)) - .push( - ...sprojects.map((it) => ({ + projects.push( + ...sprojects + .filter((it) => filterPackage(it, include, exclude)) + .map((it) => ({ ...it, projectFolder: join(diff, it.projectFolder), shouldPublish: diff === '.' ? it.shouldPublish : false })) - ) + ) } platformJson.projects = projects as unknown as CommentArray @@ -53,13 +54,16 @@ function filterPackage (it: RushPackage, include: string[], exclude: string[]): const pkgName = it.packageName for (const i of include) { if (pkgName.includes(i)) { + console.log('include', pkgName, i) return true } } for (const i of exclude) { if (pkgName.includes(i)) { + console.log('exclude', pkgName, i) return false } } + console.log('filter', pkgName, 'true') return true } From 87bc2e762d50ca2f5a8e39dc585a5beed9d7a53d Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Mon, 19 Jun 2023 15:03:51 +0700 Subject: [PATCH 4/6] UBER-477: Uberflow dependencies Signed-off-by: Andrey Sobolev --- tools/apm/apm.js | 4 ++-- tools/apm/src/sync.ts | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/tools/apm/apm.js b/tools/apm/apm.js index 00250a47ba..a255133758 100644 --- a/tools/apm/apm.js +++ b/tools/apm/apm.js @@ -20,8 +20,8 @@ Expecting one of '${r.join("', '")}'`);let u=`${e}Help`;return this.on(u,l=>{let `&&++this.index,this.lineStart=this.index;else switch(a){case"n":p+=` `;break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,p+=this.scanUnicodeCodePointEscape();else{var x=this.index,E=this.scanHexEscape(a);E!==null?p+=E:(this.index=x,p+=a)}break;case"x":var C=this.scanHexEscape(a);C===null&&this.throwUnexpectedToken(l.Messages.InvalidHexEscapeSequence),p+=C;break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+="\v";break;default:a==="0"?(u.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral),p+="\0"):u.Character.isOctalDigit(a.charCodeAt(0))?this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral):p+=a;break}else u.Character.isLineTerminator(a.charCodeAt(0))?(++this.lineNumber,a==="\r"&&this.source[this.index]===` `&&++this.index,this.lineStart=this.index,p+=` -`):p+=a}return d||this.throwUnexpectedToken(),t||this.curlyStack.pop(),{type:10,value:this.source.slice(c+1,this.index-n),cooked:p,head:t,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:c,end:this.index}},f.prototype.testRegExp=function(p,d){var c="\uFFFF",t=p,i=this;d.indexOf("u")>=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];r.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],u.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(u.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!u.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t=55296&&p<57343&&u.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(10),u=s(12),l=s(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new u.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p{function ir(h){return Array.isArray?Array.isArray(h):me(h)==="[object Array]"}I.isArray=ir;function sr(h){return typeof h=="boolean"}I.isBoolean=sr;function rr(h){return h===null}I.isNull=rr;function nr(h){return h==null}I.isNullOrUndefined=nr;function ar(h){return typeof h=="number"}I.isNumber=ar;function or(h){return typeof h=="string"}I.isString=or;function ur(h){return typeof h=="symbol"}I.isSymbol=ur;function hr(h){return h===void 0}I.isUndefined=hr;function lr(h){return me(h)==="[object RegExp]"}I.isRegExp=lr;function cr(h){return typeof h=="object"&&h!==null}I.isObject=cr;function pr(h){return me(h)==="[object Date]"}I.isDate=pr;function fr(h){return me(h)==="[object Error]"||h instanceof Error}I.isError=fr;function mr(h){return typeof h=="function"}I.isFunction=mr;function dr(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||typeof h=="symbol"||typeof h>"u"}I.isPrimitive=dr;I.isBuffer=require("buffer").Buffer.isBuffer;function me(h){return Object.prototype.toString.call(h)}});var Rt=_((zn,Xt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=h=>h<1e5?h<100?h<10?0:1:h<1e4?h<1e3?2:3:4:h<1e7?h<1e6?5:6:h<1e9?h<1e8?7:8:9;function Pt(h,e){if(h===e)return 0;if(~~h===h&&~~e===e){if(h===0||e===0)return h=0)return-1;if(h>=0)return 1;h=-h,e=-e}let u=It(h),l=It(e),o=0;return ul&&(e*=_t[u-l-1],h/=10,o=1),h===e?o:h=32;)e|=h&1,h>>=1;return h+e}function Ot(h,e,s,r){let u=e+1;if(u===s)return 1;if(r(h[u++],h[e])<0){for(;u=0;)u++;return u-e}function Mt(h,e,s){for(s--;e>>1;u(l,h[p])<0?m=p:D=p+1}let f=r-D;switch(f){case 3:h[D+3]=h[D+2],F[D+3]=F[D+2];case 2:h[D+2]=h[D+1],F[D+2]=F[D+1];case 1:h[D+1]=h[D],F[D+1]=F[D];break;default:for(;f>0;)h[D+f]=h[D+f-1],F[D+f]=F[D+f-1],f--}h[D]=l,F[D]=o}}function Ue(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])>0){for(D=r-u;m0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}else{for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}for(o++;o>>1);l(h,e[s+f])>0?o=f+1:m=f}return m}function ze(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])<0){for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}else{for(D=r-u;m=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}for(o++;o>>1);l(h,e[s+f])<0?m=f:o=f+1}return m}var He=class{constructor(e,s){this.array=e,this.compare=s;let{length:r}=e;this.length=r,this.minGallop=7,this.tmpStorageLength=r<2*256?r>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=r<120?5:r<1542?10:r<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,s){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=s,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),s===1){for(f=0;f=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--s===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--u===1){E=!0;break}while((a|x)=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(s===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--u===1){E=!0;break}if(x=u-Ue(o[p],D,0,u,u-1,l),x!==0){for(c-=x,d-=x,u-=x,i=c+1,t=d+1,f=0;f=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),u===1){for(c-=s,p-=s,i=c+1,t=p+1,f=s-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(u===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(u-1),f=0;ff&&(p=f),Lt(h,s,s+p,s+D,e),D=p}m.pushRun(s,D),m.mergeRuns(),o-=D,s+=D}while(o!==0);return m.forceMergeRuns(),F}Xt.exports={sort:Dr}});var Ut=_((Hn,Jt)=>{"use strict";var Er=Object.prototype.hasOwnProperty;Jt.exports=(h,e)=>Er.call(h,e)});var ne=_((jn,Qt)=>{var Ke=Ut(),{isObject:zt,isArray:gr,isString:vr,isNumber:Cr}=de(),$e="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",Ar="[",yr="]",Sr="{",Fr="}",wr=",",br="",kr="-",Ge=[$e,jt,Vt,Kt,$t],Br=[$e,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(h,e)=>Symbol.for(h+qt+e),xe=(h,e,s)=>Object.defineProperty(h,e,{value:s,writable:!0,configurable:!0}),Ve=(h,e,s,r,u,l)=>{let o=re(u,r);if(!Ke(e,o))return;let D=s===r?o:re(u,s);xe(h,D,e[o]),l&&delete e[o]},Yt=(h,e,s,r,u)=>{Ge.forEach(l=>{Ve(h,e,s,r,l,u)})},Tr=(h,e,s)=>{e!==s&&Ge.forEach(r=>{let u=re(r,s);if(!Ke(h,u)){Ve(h,h,s,e,r,!0);return}let l=h[u];delete h[u],Ve(h,h,s,e,r,!0),xe(h,re(r,e),l)})},je=(h,e)=>{Br.forEach(s=>{let r=e[s];r&&xe(h,s,r)})},Nr=(h,e,s)=>(s.forEach(r=>{!vr(r)&&!Cr(r)||Ke(e,r)&&(h[r]=e[r],Yt(h,e,r,r))}),h);Qt.exports={SYMBOL_PREFIXES:Ge,PREFIX_BEFORE:$e,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:Ar,BRACKET_CLOSE:yr,CURLY_BRACKET_OPEN:Sr,CURLY_BRACKET_CLOSE:Fr,COLON:qt,COMMA:wr,MINUS:kr,EMPTY:br,UNDEFINED:Ht,symbol:re,define:xe,copy_comments:Yt,swap_comments:Tr,assign_non_prop_comments:je,assign(h,e,s){if(!zt(h))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return h;if(s===Ht)s=Object.keys(e),je(h,e);else if(gr(s))s.length===0&&je(h,e);else throw new TypeError("keys must be array or undefined");return Nr(h,e,s)}}});var We=_((Vn,si)=>{var{isArray:_r}=de(),{sort:Ir}=Rt(),{SYMBOL_PREFIXES:Pr,UNDEFINED:Zt,symbol:Or,copy_comments:Mr,swap_comments:ii}=ne(),Lr=h=>{let{length:e}=h,s=0,r=e/2;for(;s{Mr(h,e,s+r,s,u)},Q=(h,e,s,r,u,l)=>{if(u>0){let D=r;for(;D-- >0;)ei(h,e,s+D,u,l);return}let o=0;for(;o{Pr.forEach(s=>{let r=Or(s,e);delete h[r]})},Xr=(h,e)=>{let s=e;for(;s in h;)s=h[s];return s},Z=class extends Array{splice(...e){let{length:s}=this,r=super.splice(...e),[u,l,...o]=e;u<0&&(u+=s),arguments.length===1?l=s-u:l=Math.min(s-u,l);let{length:D}=o,m=D-l,f=u+l,p=s-f;return Q(this,this,f,p,m,!0),r}slice(...e){let{length:s}=this,r=super.slice(...e);if(!r.length)return new Z;let[u,l]=e;return l===Zt?l=s:l<0&&(l+=s),u<0?u+=s:u===Zt&&(u=0),Q(r,this,u,l-u,-u),r}unshift(...e){let{length:s}=this,r=super.unshift(...e),{length:u}=e;return u>0&&Q(this,this,0,s,u,!0),r}shift(){let e=super.shift(),{length:s}=this;return ti(this,0),Q(this,this,1,s,-1,!0),e}reverse(){return super.reverse(),Lr(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:s}=this,r=super.concat(...e);return e.length&&(Q(r,this,0,this.length,0),e.forEach(u=>{let l=s;s+=_r(u)?u.length:1,u instanceof Z&&Q(r,u,0,u.length,l)})),r}sort(...e){let s=Ir(this,...e.slice(0,1)),r=Object.create(null);return s.forEach((u,l)=>{if(u===l)return;let o=Xr(r,u);o!==l&&(r[l]=o,ii(this,l,o))}),this}};si.exports={CommentArray:Z}});var vi=_((Kn,gi)=>{var Rr=Nt(),{CommentArray:Jr}=We(),{PREFIX_BEFORE:Ee,PREFIX_AFTER_PROP:Ur,PREFIX_AFTER_COLON:zr,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:Ye,PREFIX_BEFORE_ALL:Hr,PREFIX_AFTER_ALL:jr,BRACKET_OPEN:Vr,BRACKET_CLOSE:ri,CURLY_BRACKET_OPEN:Kr,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$r,UNDEFINED:Ce,define:Qe,assign_non_prop_comments:Gr}=ne(),li=h=>Rr.tokenize(h,{comment:!0,loc:!0}),Ze=[],K=null,z=null,et=[],$,ci=!1,pi=!1,ae=null,oe=null,P=null,fi,ge=null,mi=()=>{et.length=Ze.length=0,oe=null,$=Ce},Wr=()=>{mi(),ae.length=0,z=K=ae=oe=P=ge=null},tt=h=>Symbol.for($!==Ce?h+ui+$:h),it=(h,e)=>ge?ge(h,e):e,di=()=>{let h=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(h,P.loc.start),h},xi=()=>{let h=new SyntaxError("Unexpected end of JSON input");throw Object.assign(h,oe?oe.loc.end:{line:1,column:0}),h},R=()=>{let h=ae[++fi];pi=P&&h&&P.loc.end.line===h.loc.start.line||!1,oe=P,P=h},qe=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),W=h=>qe()===h,De=h=>{W(h)||di()},st=h=>{Ze.push(K),K=h},rt=()=>{K=Ze.pop()},Di=()=>{if(!z)return;let h=[];for(let s of z)if(s.inline)h.push(s);else break;let{length:e}=h;e&&(e===z.length?z=null:z.splice(0,e),Qe(K,tt(Ye),h))},V=h=>{z&&(Qe(K,tt(h),z),z=null)},H=h=>{let e=[];for(;P&&(W("LineComment")||W("BlockComment"));){let s={...P,inline:pi};e.push(s),R()}if(!ci&&e.length){if(h){Qe(K,tt(h),e);return}z=e}},ve=(h,e)=>{e&&et.push($),$=h},Ei=()=>{$=et.pop()},qr=()=>{let h={};st(h),ve(Ce,!0);let e=!1,s;for(H();!W(ni)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ni)));)e=!0,De("String"),s=JSON.parse(P.value),ve(s),V(Ee),R(),H(Ur),De(ui),R(),H(zr),h[s]=it(s,nt()),H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h},Yr=()=>{let h=new Jr;st(h),ve(Ce,!0);let e=!1,s=0;for(H();!W(ri)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ri)));)e=!0,ve(s),V(Ee),h[s]=it(s,nt()),s++,H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h};function nt(){let h=qe();if(h===Kr)return R(),qr();if(h===Vr)return R(),Yr();let e=$r;h===ai&&(R(),h=qe(),e=ai);let s;switch(h){case"String":case"Boolean":case"Null":case"Numeric":return s=P.value,R(),JSON.parse(e+s);default:}}var Qr=h=>Object(h)===h,Zr=(h,e,s)=>{mi(),ae=li(h),ge=e,ci=s,ae.length||xi(),fi=-1,R(),st({}),H(Hr);let r=nt();return H(jr),P&&di(),!s&&r!==null&&(Qr(r)||(r=new Object(r)),Gr(r,K)),rt(),r=it("",r),Wr(),r};gi.exports={parse:Zr,tokenize:li}});var Ai=_(($n,Ci)=>{"use strict";var j="",at;Ci.exports=en;function en(h,e){if(typeof h!="string")throw new TypeError("expected a string");if(e===1)return h;if(e===2)return h+h;var s=h.length*e;if(at!==h||typeof at>"u")at=h,j="";else if(j.length>=s)return j.substr(0,s);for(;s>j.length&&e>1;)e&1&&(j+=h),e>>=1,h+=h;return j+=h,j=j.substr(0,s),j}});var Ii=_((Gn,_i)=>{var{isArray:ht,isObject:yi,isFunction:ut,isNumber:tn,isString:sn}=de(),rn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:lt,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:X,UNDEFINED:dn}=ne(),ot=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ct=" ",q=` -`,wi="null",bi=h=>`${Si}:${h}`,xn=h=>`${an}:${h}`,Dn=h=>`${on}:${h}`,ki=h=>`${un}:${h}`,Bi=h=>`${lt}:${h}`,En={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},gn=h=>(ot.lastIndex=0,ot.test(h)?h.replace(ot,e=>{let s=En[e];return typeof s=="string"?s:e}):h),Ti=h=>`"${gn(h)}"`,vn=(h,e)=>e?`//${h}`:`/*${h}*/`,L=(h,e,s,r)=>{let u=h[Symbol.for(e)];if(!u||!u.length)return X;let l=!1,o=u.reduce((D,{inline:m,type:f,value:p})=>{let d=m?ct:q+s;return l=f==="LineComment",D+d+vn(p,l)},X);return r||l?o+q+s:o},ee=null,he=X,Cn=()=>{ee=null,he=X},ue=(h,e,s)=>h?e?h+e.trim()+q+s:h.trimRight()+q+s:e?e.trimRight()+q+s:X,Ni=(h,e,s)=>{let r=L(e,Si,s+he,!0);return ue(r,h,s)},An=(h,e)=>{let s=e+he,{length:r}=h,u=X,l=X;for(let o=0;o{if(!h)return"null";let s=e+he,r=X,u=X,l=!0,o=ht(ee)?ee:Object.keys(h),D=m=>{let f=pt(m,h,s);if(f===dn)return;l||(r+=Fi),l=!1;let p=ue(u,L(h,bi(m),s),s);r+=p||q+s,r+=Ti(m)+L(h,xn(m),s)+mn+L(h,Dn(m),s)+ct+f+L(h,ki(m),s),u=L(h,Bi(m),s)};return o.forEach(D),r+=ue(u,L(h,lt,s),s),pn+Ni(r,h,e)+fn};function pt(h,e,s){let r=e[h];switch(yi(r)&&ut(r.toJSON)&&(r=r.toJSON(h)),ut(ee)&&(r=ee.call(e,h,r)),typeof r){case"string":return Ti(r);case"number":return Number.isFinite(r)?String(r):wi;case"boolean":case"null":return String(r);case"object":return ht(r)?An(r,s):yn(r,s);default:}}var Sn=h=>sn(h)?h:tn(h)?rn(ct,h):X,{toString:Fn}=Object.prototype,wn=["[object Number]","[object String]","[object Boolean]"],bn=h=>{if(typeof h!="object")return!1;let e=Fn.call(h);return wn.includes(e)};_i.exports=(h,e,s)=>{let r=Sn(s);if(!r)return JSON.stringify(h,e);!ut(e)&&!ht(e)&&(e=null),ee=e,he=r;let u=bn(h)?JSON.stringify(h):pt("",{"":h},X);return Cn(),yi(h)?L(h,nn,X).trimLeft()+u+L(h,hn,X).trimRight():u}});var Oi=_((Wn,Pi)=>{var{parse:kn,tokenize:Bn}=vi(),Tn=Ii(),{CommentArray:Nn}=We(),{assign:_n}=ne();Pi.exports={parse:kn,stringify:Tn,tokenize:Bn,CommentArray:Nn,assign:_n}});var Ae=we(Tt()),Li=require("path");var le=we(Oi()),ce=require("fs/promises"),J=we(require("path"));async function Mi(h,e,s,r,u){var f;let l=(0,le.parse)((await(0,ce.readFile)((0,J.join)(process.cwd(),s,"rush.json"))).toString()),o=(0,J.join)(e,"rush.json"),D=J.default.resolve(e).split(J.default.sep),m=[];for(let p of[(0,J.join)(s,"rush.json"),...h]){let d=J.default.dirname(J.default.resolve(p)).split(J.default.sep),c=J.default.join(...d.slice(D.length)),t=await(0,le.parse)((await(0,ce.readFile)(p)).toString());console.log("Processing",p,(f=t.projects)==null?void 0:f.length);let i=t.projects;for(let[n,a]of Object.entries(t))l[n]=a;m.push(...i.filter(n=>In(n,r,u)).map(n=>Dt(xt({},n),{projectFolder:(0,J.join)(c,n.projectFolder),shouldPublish:c==="."?n.shouldPublish:!1})))}l.projects=m,await(0,ce.writeFile)(o,(0,le.stringify)(l,void 0,2))}function In(h,e,s){let r=h.packageName;for(let u of e)if(r.includes(u))return console.log("include",r,u),!0;for(let u of s)if(r.includes(u))return console.log("exclude",r,u),!1;return console.log("filter",r,"true"),!0}console.info("Anticrm Platform Manager");Ae.program.version("0.6.0");Ae.program.command("rush-sync ").description("Synchronized rush.js files with platform.").option("-e, --exclude ","List of exclude patterns to override excludes (comma separated)","").option("-i, --include ","List of include patterns to override excludes (comma separated)","").option("-s, --source ","Comma separated list of rush_source.json files","rush_source.json").action(async(h,e)=>{await Mi(e.source.split(",").map(s=>(0,Li.join)(process.cwd(),s.trim())),process.cwd(),h,e.include.split(","),e.exclude.split(","))});Ae.program.parse(process.argv); +`):p+=a}return d||this.throwUnexpectedToken(),t||this.curlyStack.pop(),{type:10,value:this.source.slice(c+1,this.index-n),cooked:p,head:t,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:c,end:this.index}},f.prototype.testRegExp=function(p,d){var c="\uFFFF",t=p,i=this;d.indexOf("u")>=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];r.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],u.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(u.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!u.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t=55296&&p<57343&&u.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(10),u=s(12),l=s(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new u.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p{function ir(h){return Array.isArray?Array.isArray(h):me(h)==="[object Array]"}I.isArray=ir;function sr(h){return typeof h=="boolean"}I.isBoolean=sr;function rr(h){return h===null}I.isNull=rr;function nr(h){return h==null}I.isNullOrUndefined=nr;function ar(h){return typeof h=="number"}I.isNumber=ar;function or(h){return typeof h=="string"}I.isString=or;function ur(h){return typeof h=="symbol"}I.isSymbol=ur;function hr(h){return h===void 0}I.isUndefined=hr;function lr(h){return me(h)==="[object RegExp]"}I.isRegExp=lr;function cr(h){return typeof h=="object"&&h!==null}I.isObject=cr;function pr(h){return me(h)==="[object Date]"}I.isDate=pr;function fr(h){return me(h)==="[object Error]"||h instanceof Error}I.isError=fr;function mr(h){return typeof h=="function"}I.isFunction=mr;function dr(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||typeof h=="symbol"||typeof h>"u"}I.isPrimitive=dr;I.isBuffer=require("buffer").Buffer.isBuffer;function me(h){return Object.prototype.toString.call(h)}});var Rt=_((Un,Xt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=h=>h<1e5?h<100?h<10?0:1:h<1e4?h<1e3?2:3:4:h<1e7?h<1e6?5:6:h<1e9?h<1e8?7:8:9;function Pt(h,e){if(h===e)return 0;if(~~h===h&&~~e===e){if(h===0||e===0)return h=0)return-1;if(h>=0)return 1;h=-h,e=-e}let u=It(h),l=It(e),o=0;return ul&&(e*=_t[u-l-1],h/=10,o=1),h===e?o:h=32;)e|=h&1,h>>=1;return h+e}function Ot(h,e,s,r){let u=e+1;if(u===s)return 1;if(r(h[u++],h[e])<0){for(;u=0;)u++;return u-e}function Mt(h,e,s){for(s--;e>>1;u(l,h[p])<0?m=p:D=p+1}let f=r-D;switch(f){case 3:h[D+3]=h[D+2],F[D+3]=F[D+2];case 2:h[D+2]=h[D+1],F[D+2]=F[D+1];case 1:h[D+1]=h[D],F[D+1]=F[D];break;default:for(;f>0;)h[D+f]=h[D+f-1],F[D+f]=F[D+f-1],f--}h[D]=l,F[D]=o}}function Ue(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])>0){for(D=r-u;m0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}else{for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}for(o++;o>>1);l(h,e[s+f])>0?o=f+1:m=f}return m}function ze(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])<0){for(D=u+1;mD&&(m=D);let f=o;o=u-m,m=u-f}else{for(D=r-u;m=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}for(o++;o>>1);l(h,e[s+f])<0?m=f:o=f+1}return m}var He=class{constructor(e,s){this.array=e,this.compare=s;let{length:r}=e;this.length=r,this.minGallop=7,this.tmpStorageLength=r<2*256?r>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=r<120?5:r<1542?10:r<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,s){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=s,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),s===1){for(f=0;f=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--s===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--u===1){E=!0;break}while((a|x)=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(s===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--u===1){E=!0;break}if(x=u-Ue(o[p],D,0,u,u-1,l),x!==0){for(c-=x,d-=x,u-=x,i=c+1,t=d+1,f=0;f=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),u===1){for(c-=s,p-=s,i=c+1,t=p+1,f=s-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(u===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(u-1),f=0;ff&&(p=f),Lt(h,s,s+p,s+D,e),D=p}m.pushRun(s,D),m.mergeRuns(),o-=D,s+=D}while(o!==0);return m.forceMergeRuns(),F}Xt.exports={sort:Dr}});var Ut=_((zn,Jt)=>{"use strict";var Er=Object.prototype.hasOwnProperty;Jt.exports=(h,e)=>Er.call(h,e)});var ne=_((Hn,Qt)=>{var Ke=Ut(),{isObject:zt,isArray:gr,isString:vr,isNumber:Cr}=de(),$e="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",Ar="[",yr="]",Sr="{",Fr="}",wr=",",br="",kr="-",Ge=[$e,jt,Vt,Kt,$t],Br=[$e,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(h,e)=>Symbol.for(h+qt+e),xe=(h,e,s)=>Object.defineProperty(h,e,{value:s,writable:!0,configurable:!0}),Ve=(h,e,s,r,u,l)=>{let o=re(u,r);if(!Ke(e,o))return;let D=s===r?o:re(u,s);xe(h,D,e[o]),l&&delete e[o]},Yt=(h,e,s,r,u)=>{Ge.forEach(l=>{Ve(h,e,s,r,l,u)})},Tr=(h,e,s)=>{e!==s&&Ge.forEach(r=>{let u=re(r,s);if(!Ke(h,u)){Ve(h,h,s,e,r,!0);return}let l=h[u];delete h[u],Ve(h,h,s,e,r,!0),xe(h,re(r,e),l)})},je=(h,e)=>{Br.forEach(s=>{let r=e[s];r&&xe(h,s,r)})},Nr=(h,e,s)=>(s.forEach(r=>{!vr(r)&&!Cr(r)||Ke(e,r)&&(h[r]=e[r],Yt(h,e,r,r))}),h);Qt.exports={SYMBOL_PREFIXES:Ge,PREFIX_BEFORE:$e,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:Ar,BRACKET_CLOSE:yr,CURLY_BRACKET_OPEN:Sr,CURLY_BRACKET_CLOSE:Fr,COLON:qt,COMMA:wr,MINUS:kr,EMPTY:br,UNDEFINED:Ht,symbol:re,define:xe,copy_comments:Yt,swap_comments:Tr,assign_non_prop_comments:je,assign(h,e,s){if(!zt(h))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return h;if(s===Ht)s=Object.keys(e),je(h,e);else if(gr(s))s.length===0&&je(h,e);else throw new TypeError("keys must be array or undefined");return Nr(h,e,s)}}});var We=_((jn,si)=>{var{isArray:_r}=de(),{sort:Ir}=Rt(),{SYMBOL_PREFIXES:Pr,UNDEFINED:Zt,symbol:Or,copy_comments:Mr,swap_comments:ii}=ne(),Lr=h=>{let{length:e}=h,s=0,r=e/2;for(;s{Mr(h,e,s+r,s,u)},Q=(h,e,s,r,u,l)=>{if(u>0){let D=r;for(;D-- >0;)ei(h,e,s+D,u,l);return}let o=0;for(;o{Pr.forEach(s=>{let r=Or(s,e);delete h[r]})},Xr=(h,e)=>{let s=e;for(;s in h;)s=h[s];return s},Z=class extends Array{splice(...e){let{length:s}=this,r=super.splice(...e),[u,l,...o]=e;u<0&&(u+=s),arguments.length===1?l=s-u:l=Math.min(s-u,l);let{length:D}=o,m=D-l,f=u+l,p=s-f;return Q(this,this,f,p,m,!0),r}slice(...e){let{length:s}=this,r=super.slice(...e);if(!r.length)return new Z;let[u,l]=e;return l===Zt?l=s:l<0&&(l+=s),u<0?u+=s:u===Zt&&(u=0),Q(r,this,u,l-u,-u),r}unshift(...e){let{length:s}=this,r=super.unshift(...e),{length:u}=e;return u>0&&Q(this,this,0,s,u,!0),r}shift(){let e=super.shift(),{length:s}=this;return ti(this,0),Q(this,this,1,s,-1,!0),e}reverse(){return super.reverse(),Lr(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:s}=this,r=super.concat(...e);return e.length&&(Q(r,this,0,this.length,0),e.forEach(u=>{let l=s;s+=_r(u)?u.length:1,u instanceof Z&&Q(r,u,0,u.length,l)})),r}sort(...e){let s=Ir(this,...e.slice(0,1)),r=Object.create(null);return s.forEach((u,l)=>{if(u===l)return;let o=Xr(r,u);o!==l&&(r[l]=o,ii(this,l,o))}),this}};si.exports={CommentArray:Z}});var vi=_((Vn,gi)=>{var Rr=Nt(),{CommentArray:Jr}=We(),{PREFIX_BEFORE:Ee,PREFIX_AFTER_PROP:Ur,PREFIX_AFTER_COLON:zr,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:Ye,PREFIX_BEFORE_ALL:Hr,PREFIX_AFTER_ALL:jr,BRACKET_OPEN:Vr,BRACKET_CLOSE:ri,CURLY_BRACKET_OPEN:Kr,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$r,UNDEFINED:Ce,define:Qe,assign_non_prop_comments:Gr}=ne(),li=h=>Rr.tokenize(h,{comment:!0,loc:!0}),Ze=[],K=null,z=null,et=[],$,ci=!1,pi=!1,ae=null,oe=null,P=null,fi,ge=null,mi=()=>{et.length=Ze.length=0,oe=null,$=Ce},Wr=()=>{mi(),ae.length=0,z=K=ae=oe=P=ge=null},tt=h=>Symbol.for($!==Ce?h+ui+$:h),it=(h,e)=>ge?ge(h,e):e,di=()=>{let h=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(h,P.loc.start),h},xi=()=>{let h=new SyntaxError("Unexpected end of JSON input");throw Object.assign(h,oe?oe.loc.end:{line:1,column:0}),h},R=()=>{let h=ae[++fi];pi=P&&h&&P.loc.end.line===h.loc.start.line||!1,oe=P,P=h},qe=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),W=h=>qe()===h,De=h=>{W(h)||di()},st=h=>{Ze.push(K),K=h},rt=()=>{K=Ze.pop()},Di=()=>{if(!z)return;let h=[];for(let s of z)if(s.inline)h.push(s);else break;let{length:e}=h;e&&(e===z.length?z=null:z.splice(0,e),Qe(K,tt(Ye),h))},V=h=>{z&&(Qe(K,tt(h),z),z=null)},H=h=>{let e=[];for(;P&&(W("LineComment")||W("BlockComment"));){let s={...P,inline:pi};e.push(s),R()}if(!ci&&e.length){if(h){Qe(K,tt(h),e);return}z=e}},ve=(h,e)=>{e&&et.push($),$=h},Ei=()=>{$=et.pop()},qr=()=>{let h={};st(h),ve(Ce,!0);let e=!1,s;for(H();!W(ni)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ni)));)e=!0,De("String"),s=JSON.parse(P.value),ve(s),V(Ee),R(),H(Ur),De(ui),R(),H(zr),h[s]=it(s,nt()),H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h},Yr=()=>{let h=new Jr;st(h),ve(Ce,!0);let e=!1,s=0;for(H();!W(ri)&&!(e&&(V(oi),De(hi),R(),H(),Di(),W(ri)));)e=!0,ve(s),V(Ee),h[s]=it(s,nt()),s++,H();return e&&V(Ye),R(),$=void 0,e||V(Ee),rt(),Ei(),h};function nt(){let h=qe();if(h===Kr)return R(),qr();if(h===Vr)return R(),Yr();let e=$r;h===ai&&(R(),h=qe(),e=ai);let s;switch(h){case"String":case"Boolean":case"Null":case"Numeric":return s=P.value,R(),JSON.parse(e+s);default:}}var Qr=h=>Object(h)===h,Zr=(h,e,s)=>{mi(),ae=li(h),ge=e,ci=s,ae.length||xi(),fi=-1,R(),st({}),H(Hr);let r=nt();return H(jr),P&&di(),!s&&r!==null&&(Qr(r)||(r=new Object(r)),Gr(r,K)),rt(),r=it("",r),Wr(),r};gi.exports={parse:Zr,tokenize:li}});var Ai=_((Kn,Ci)=>{"use strict";var j="",at;Ci.exports=en;function en(h,e){if(typeof h!="string")throw new TypeError("expected a string");if(e===1)return h;if(e===2)return h+h;var s=h.length*e;if(at!==h||typeof at>"u")at=h,j="";else if(j.length>=s)return j.substr(0,s);for(;s>j.length&&e>1;)e&1&&(j+=h),e>>=1,h+=h;return j+=h,j=j.substr(0,s),j}});var Ii=_(($n,_i)=>{var{isArray:ht,isObject:yi,isFunction:ut,isNumber:tn,isString:sn}=de(),rn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:lt,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:X,UNDEFINED:dn}=ne(),ot=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ct=" ",q=` +`,wi="null",bi=h=>`${Si}:${h}`,xn=h=>`${an}:${h}`,Dn=h=>`${on}:${h}`,ki=h=>`${un}:${h}`,Bi=h=>`${lt}:${h}`,En={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},gn=h=>(ot.lastIndex=0,ot.test(h)?h.replace(ot,e=>{let s=En[e];return typeof s=="string"?s:e}):h),Ti=h=>`"${gn(h)}"`,vn=(h,e)=>e?`//${h}`:`/*${h}*/`,L=(h,e,s,r)=>{let u=h[Symbol.for(e)];if(!u||!u.length)return X;let l=!1,o=u.reduce((D,{inline:m,type:f,value:p})=>{let d=m?ct:q+s;return l=f==="LineComment",D+d+vn(p,l)},X);return r||l?o+q+s:o},ee=null,he=X,Cn=()=>{ee=null,he=X},ue=(h,e,s)=>h?e?h+e.trim()+q+s:h.trimRight()+q+s:e?e.trimRight()+q+s:X,Ni=(h,e,s)=>{let r=L(e,Si,s+he,!0);return ue(r,h,s)},An=(h,e)=>{let s=e+he,{length:r}=h,u=X,l=X;for(let o=0;o{if(!h)return"null";let s=e+he,r=X,u=X,l=!0,o=ht(ee)?ee:Object.keys(h),D=m=>{let f=pt(m,h,s);if(f===dn)return;l||(r+=Fi),l=!1;let p=ue(u,L(h,bi(m),s),s);r+=p||q+s,r+=Ti(m)+L(h,xn(m),s)+mn+L(h,Dn(m),s)+ct+f+L(h,ki(m),s),u=L(h,Bi(m),s)};return o.forEach(D),r+=ue(u,L(h,lt,s),s),pn+Ni(r,h,e)+fn};function pt(h,e,s){let r=e[h];switch(yi(r)&&ut(r.toJSON)&&(r=r.toJSON(h)),ut(ee)&&(r=ee.call(e,h,r)),typeof r){case"string":return Ti(r);case"number":return Number.isFinite(r)?String(r):wi;case"boolean":case"null":return String(r);case"object":return ht(r)?An(r,s):yn(r,s);default:}}var Sn=h=>sn(h)?h:tn(h)?rn(ct,h):X,{toString:Fn}=Object.prototype,wn=["[object Number]","[object String]","[object Boolean]"],bn=h=>{if(typeof h!="object")return!1;let e=Fn.call(h);return wn.includes(e)};_i.exports=(h,e,s)=>{let r=Sn(s);if(!r)return JSON.stringify(h,e);!ut(e)&&!ht(e)&&(e=null),ee=e,he=r;let u=bn(h)?JSON.stringify(h):pt("",{"":h},X);return Cn(),yi(h)?L(h,nn,X).trimLeft()+u+L(h,hn,X).trimRight():u}});var Oi=_((Gn,Pi)=>{var{parse:kn,tokenize:Bn}=vi(),Tn=Ii(),{CommentArray:Nn}=We(),{assign:_n}=ne();Pi.exports={parse:kn,stringify:Tn,tokenize:Bn,CommentArray:Nn,assign:_n}});var Ae=we(Tt()),Li=require("path");var le=we(Oi()),ce=require("fs/promises"),J=we(require("path"));async function Mi(h,e,s,r,u){let l=(0,le.parse)((await(0,ce.readFile)((0,J.join)(process.cwd(),s,"rush.json"))).toString()),o=(0,J.join)(e,"rush.json"),D=J.default.resolve(e).split(J.default.sep),m=[];for(let f of[(0,J.join)(s,"rush.json"),...h]){let p=J.default.dirname(J.default.resolve(f)).split(J.default.sep),d=J.default.join(...p.slice(D.length)),c=await(0,le.parse)((await(0,ce.readFile)(f)).toString()),t=c.projects;for(let[i,n]of Object.entries(c))l[i]=n;m.push(...t.map(i=>Dt(xt({},i),{projectFolder:(0,J.join)(d,i.projectFolder),shouldPublish:d==="."?i.shouldPublish:!1})))}l.projects=m,await(0,ce.writeFile)(o,(0,le.stringify)(l,void 0,2))}console.info("Anticrm Platform Manager");Ae.program.version("0.6.0");Ae.program.command("rush-sync ").description("Synchronized rush.js files with platform.").option("-e, --exclude ","List of exclude patterns to override excludes (comma separated)","").option("-i, --include ","List of include patterns to override excludes (comma separated)","").option("-s, --source ","Comma separated list of rush_source.json files","rush_source.json").action(async(h,e)=>{await Mi(e.source.split(",").map(s=>(0,Li.join)(process.cwd(),s.trim())),process.cwd(),h,e.include.split(","),e.exclude.split(","))});Ae.program.parse(process.argv); /*! Bundled license information: repeat-string/index.js: diff --git a/tools/apm/src/sync.ts b/tools/apm/src/sync.ts index b7f5e7a8be..4c37a5facb 100644 --- a/tools/apm/src/sync.ts +++ b/tools/apm/src/sync.ts @@ -29,21 +29,20 @@ export async function syncRushFiles ( const sPath = path.dirname(path.resolve(prj)).split(path.sep) const diff = path.join(...sPath.slice(abs.length)) const rushJsonSource = (await parse((await readFile(prj)).toString())) as CommentObject - console.log('Processing', prj, (rushJsonSource.projects as any)?.length) const sprojects = rushJsonSource.projects as unknown as CommentArray for (const [k, v] of Object.entries(rushJsonSource)) { platformJson[k] = v } - projects.push( - ...sprojects - .filter((it) => filterPackage(it, include, exclude)) - .map((it) => ({ + projects + .filter((it) => filterPackage(it, include, exclude)) + .push( + ...sprojects.map((it) => ({ ...it, projectFolder: join(diff, it.projectFolder), shouldPublish: diff === '.' ? it.shouldPublish : false })) - ) + ) } platformJson.projects = projects as unknown as CommentArray @@ -54,16 +53,13 @@ function filterPackage (it: RushPackage, include: string[], exclude: string[]): const pkgName = it.packageName for (const i of include) { if (pkgName.includes(i)) { - console.log('include', pkgName, i) return true } } for (const i of exclude) { if (pkgName.includes(i)) { - console.log('exclude', pkgName, i) return false } } - console.log('filter', pkgName, 'true') return true } From 101bdd95057c5a05d7a2488bad413fc425043ce1 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Mon, 19 Jun 2023 21:12:22 +0700 Subject: [PATCH 5/6] Update PNPM to 6.14.1 Signed-off-by: Andrey Sobolev --- common/config/rush/pnpm-lock.yaml | 3 ++- rush.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 90ebb4f161..54e37a75f3 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -18727,13 +18727,14 @@ packages: dev: false file:projects/minio.tgz: - resolution: {integrity: sha512-96cz8nKgyHNMc6UQeMrIlPof2LUv8btuUhg6JHXQs19caEbFGRDajG8tbJZ83Mm8eQHP2CBwDDXgP3hlDDK62g==, tarball: file:projects/minio.tgz} + resolution: {integrity: sha512-HDxYF3wfgSvuq+57ZoxfNDaC92St3f+/ybevhmwexFmiDEyyQNN4pMZi0LtOkjLiP4bNJ1tLkkb9ooQc1pr+VA==, tarball: file:projects/minio.tgz} name: '@rush-temp/minio' version: 0.0.0 dependencies: '@rushstack/heft': 0.47.11 '@types/heft-jest': 1.0.3 '@types/minio': 7.0.14 + '@types/node': 16.11.68 '@typescript-eslint/eslint-plugin': 5.42.1_d506b9be61cb4ac2646ecbc6e0680464 '@typescript-eslint/parser': 5.42.1_eslint@8.27.0+typescript@4.8.4 eslint: 8.27.0 diff --git a/rush.json b/rush.json index e845c4a550..4c8d86aa7c 100644 --- a/rush.json +++ b/rush.json @@ -26,7 +26,7 @@ * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation * for details about these alternatives. */ - "pnpmVersion": "6.7.1", + "pnpmVersion": "6.14.1", // "npmVersion": "4.5.0", // "yarnVersion": "1.9.4", From fbd7f504d51bf5a7d044386176ec48ae1b401eaa Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Mon, 19 Jun 2023 21:48:02 +0700 Subject: [PATCH 6/6] Use PNPM 6.35.1 Signed-off-by: Andrey Sobolev --- rush.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rush.json b/rush.json index 4c8d86aa7c..642b9b87de 100644 --- a/rush.json +++ b/rush.json @@ -26,7 +26,7 @@ * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation * for details about these alternatives. */ - "pnpmVersion": "6.14.1", + "pnpmVersion": "6.35.1", // "npmVersion": "4.5.0", // "yarnVersion": "1.9.4",